input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>atn34/foundationdb # # vector.py # # This source file is part of the FoundationDB open source project # # Copyright 2013-2018 Apple Inc. and the FoundationDB project authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
"https://api.github.com/users/jwodder/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jwodder", "id": 98207, "login": "jwodder", "organizations_url": "https://api.github.com/users/jwodder/orgs", "received_events_url": "https://api.github.com/users/jwodder/received_events", "repos_url": "http...
: self.current_source_dir_method, 'current_build_dir' : self.current_build_dir_method, 'source_root' : self.source_root_method, 'build_root' : self.build_root_method, 'add_install_script' : self.add_install_script_method, 'add_postconf_script' : self.add_postconf_script_method, 'install_dependency_manifest': self...
import os import matplotlib.pyplot as plt from matplotlib.ticker import StrMethodFormatter import pandas as pd import numpy as np from sklearn.metrics import confusion_matrix from helpers import filter_models_info, get_log_metric, get_test_metric from sklearn.metrics import accuracy_score, balanced_accuracy_score, reca...
+(?P<last_notif_sent>[\w\-]+)$') p20 = re.compile(r'^\s*Nve +Mcast +Src +node +last +notif +sent: +(?P<last_notif_sent>[\w\-]+)$') p20_1 = re.compile(r'^\s*Nve +MultiSite +Src +node +last +notif +sent: +(?P<notif_sent>[\w\-]+)$') p21 = re.compile( r'^\s*Multisite +bgw\-if: +(?P<multisite_bgw_if>[\w\/\-]+) +\(ip: +(...
""" There are a few important sets of datastructures: dimensions * N - Size of the dstore. * K - Number of retrieved neighbors. * D - Size of the key vectors. dstore - This is the "ground truth" source of keys, values, and other important items created by the KNN-LM. * dstore_keys.npy - The vectors. NxD * d...
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2012 <NAME> <mkalewski at cs.put.poznan.pl> # # This file is a part of the Simple Network Simulator (sim2net) project. # USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO # THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD HAVE RECEIVE...
<filename>pypet2bids/pypet2bids/dcm2niix4pet.py import os import sys import warnings from json_maj.main import JsonMAJ, load_json_or_dict from pypet2bids.helper_functions import ParseKwargs, get_version, translate_metadata, expand_path import subprocess import pandas as pd from os.path import join from os import listd...
os.path.join(outFolderraven, Model_Name + ".rvt") obsflodername = "./" + os.path.split(outObsfileFolder)[1] + "/" output_string = ( " \n" + ":RedirectToFile " + obsflodername + obsnm["Obs_NM"] + "_" + str(obsnm["SubId"]) + ".rvt" + " \n" ) return output_string def Generate_Raven_Obs_rvt_String( catinfo, ...
41.6666666666667*m.b11 + m.x1993 <= 0) m.c3678 = Constraint(expr= - 41.6666666666667*m.b12 + m.x1994 <= 0) m.c3679 = Constraint(expr= - 41.6666666666667*m.b13 + m.x1995 <= 0) m.c3680 = Constraint(expr= - 41.6666666666667*m.b14 + m.x1996 <= 0) m.c3681 = Constraint(expr= - 41.6666666666667*m.b15 + m.x1997 <= 0) m.c3...
1.15, 1.10]) a_sig = np.array([250, 300, 210, 430, 470, 495]) a_ref = np.array([450, 460, 470, 480, 490, 500]) a_off = np.array([0.35, 0.30, 0.25, 0.20, 0.15, 0.10]) # traw, T, and PS must be scalar (before vectorization). traw = 48355 Tcal = 20.0 T = 12.0 PS = 35.0 # also test case of user selected referenc...
<gh_stars>1-10 # coding=utf-8 # Copyright 2020 The Google Research Authors. # # 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 ...
to build the final bilayer, will be saved in that directory. Example: --output_directory ./my_output/", 70, subsequent_indent = " ") print textwrap.fill("--use_disk_instead_of_memory: For very large systems, storing the growing model in memory can be problematic. If this parameter is set to TRUE, the growing model wil...
<reponame>rwl/godot<filename>godot/node.py #------------------------------------------------------------------------------ # Copyright (c) 2009 <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...
# coding: utf-8 """ OpenSilex API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: INSTANCE-SNAPSHOT Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re #...
) -> List[Gallery]: """ Executes the search given by the `q` query parameter, and returns **gallery responses** sorted by descending creation time. A request will be sent to the following endpoint: `/api/v1/json/search/galleries` It will take in account `self._base_url` and fill in all url variables and append the...
# -*- coding: utf-8 -*- import os from hashlib import sha512 from datetime import datetime, timedelta from uuid import uuid4 from copy import deepcopy from openprocurement.api.constants import SANDBOX_MODE from openprocurement.api.tests.base import BaseWebTest from openprocurement.api.utils import get_now from openproc...
feature = cols[2] feat_s = int(cols[3]) feat_e = int(cols[4]) feat_pol = cols[6] infos = cols[8] if not feature == "gene": continue # Restrict to standard chromosomes. new_chr_id = check_convert_chr_id(chr_id) if not new_chr_id: continue else: chr_id = new_chr_id # Make start coordinate 0-base (BED stand...
ctxcls def formatfields( self, formatter: str = 'str', ) -> Iterator[Tuple[str, str]]: """Return an iterator over fields formatted using `formatter`.""" for name, field in self.__class__._fields.items(): value = getattr(self, name) default = field.default formatter_obj = field.formatters.get(formatter) if fo...
<reponame>MattiasBeming/LiU-AI-Project-Active-Learning-for-Music # FMA: A Dataset For Music Analysis # <NAME>, <NAME>, <NAME>, # <NAME>, EPFL LTS2. # All features are extracted # using [librosa](https://github.com/librosa/librosa). # Note: # This file was edited to work for emo-music in our project. # All credit for ...
""" Type inference for user-defined classes. """ from __future__ import absolute_import import types from rpython.flowspace.model import Constant from rpython.tool.flattenrec import FlattenRecursion from rpython.tool.sourcetools import func_with_new_name from rpython.tool.uid import Hashable from rpython.annotator.mod...
default to all " "accounts, you may pass the optional argument --force. When " "the argument messages was omitted the default number of " "messages 0 (zero) will be applied." ) ), formatter_class=RawDescriptionHelpFormatter, ) dq.add_argument("fqdn", help=_("a fully qualified domain name")) dq.add_argument( "...
<filename>lib/stsci/tools/convertwaiveredfits.py #!/usr/bin/env python # $Id$ """ Convert a waivered FITS file to various other formats. Syntax for the command line:: convertwaiveredfits.py [-hm] [-o <outputFileName>,...] FILE ... Convert the waivered FITS files (wFITS) to various formats. The default conversion ...
unique_queries: if self.count(query, distinct=False) != 0: # one of the 'OR' queries failed, see which one raise Exception( "NOT UNIQUE constraint failed: %s" % query.first.name ) def insert(self, table, fields, safe=None): """Safe determines whether a asynchronous request is done or a synchronous action is do...
<reponame>cdown/statsmodels<filename>statsmodels/stats/sandwich_covariance.py # -*- coding: utf-8 -*- """Sandwich covariance estimators Created on Sun Nov 27 14:10:57 2011 Author: <NAME> Author: <NAME> for HCxxx in linear_model.RegressionResults License: BSD-3 Notes ----- for calculating it, we have two versions ...
that is associated with this System.Windows.Automation.Peers.UIElementAutomationPeer is understood by the end user as interactive. Optionally, the user might understand the System.Windows.UIElement as contributing to the logical structure of the control in the GUI. This method is called by System.Wi...
pulumi.get(self, "enabled") @enabled.setter def enabled(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "enabled", value) @property @pulumi.getter def extra(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: """ Free-form key/value pairs of extra information. """ return pulumi.get(self, "extra...
# Copyright 2021, 2022 Cambridge Quantum Computing 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...
esse consequat eiusmod duis eiusmod id elit laboris laborum." } ], "paraphraseQuestions": [ { "id": "d27bb0a6-c3c3-11e7-8d29-d15d28ee5381", "question": "Quis nulla excepteur magna id elit ullamco occaecat aliqua officia ipsum sint veniam occaecat reprehenderit." } ], "created": 1500641947, "modified": 1505739...
req.body_file.read(MAX_RPC_BODY_SIZE).split(b'\n') if req.body_file.read(1): return swob.HTTPRequestEntityTooLarge(request=req) else: if cl > MAX_RPC_BODY_SIZE: return swob.HTTPRequestEntityTooLarge(request=req) json_payloads = req.body.split(b'\n') if self.bypass_mode == 'read-write': allowed_methods = rpc.al...
<gh_stars>0 # # Copyright (C) 2001-2004 <NAME> and Rational Discovery LLC # All Rights Reserved # """ The "parser" for compound descriptors. I almost hesitate to document this, because it's not the prettiest thing the world has ever seen... but it does work (for at least some definitions of the word). Rather than get...
< len(name): index_letter = name[index].upper() else: index_letter = '->' if index_letter not in index_letters: index_letters.append(index_letter) letter_name_info[index_letter] = [] letter_name_info[index_letter].append(name) index += 1 for index_letter in index_letters: text += ',\n' text += '\t' * 7 + '{...
by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_customer_sessions_multiple_with_http_info(customer_id, body, callback=callback_function) :param call...
& 0x0F)) if lightModeHigh != LightModeDrone.None_ and lightModeLow != LightModeDrone.None_: drone.sendLightModeColor(lightMode, interval, r, g, b) def lightModeSingle(self, strLightPart, strLightMode, interval): #drone = Drone(True, True, True, True, True) drone = Drone() if drone.open() == False: print(Fore...
Quobyte represents a Quobyte mount on the host that shares a pod's lifetime """ return pulumi.get(self, "quobyte") @property @pulumi.getter def rbd(self) -> Optional['outputs.DatadogAgentSpecClusterChecksRunnerConfigVolumesRbd']: """ RBD represents a Rados Block Device mount on the host that shares a pod's life...
# @date 2018-08-25 # @author <NAME>, All rights reserved without prejudices. # @license Copyright (c) 2018 Dream Overflow # Trader connector for ig.com from __future__ import annotations from typing import TYPE_CHECKING, List, Union, Optional if TYPE_CHECKING: from trader.service import TraderService from trader.m...
import tensorflow as tf from tensorflow.python.layers.core import Dense import numpy as np import time import matplotlib as mpl import copy import os from tensorflow.python.ops import rnn_cell_impl # mpl.use('Agg') # import matplotlib.pyplot as plt import os # Number of Epochs epochs = 100 # Batch Size ...
Optional[pulumi.Input[str]]: """ A string indicating the Operating System type for this function app. """ return pulumi.get(self, "os_type") @os_type.setter def os_type(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "os_type", value) @property @pulumi.getter(name="siteConfig") def site_config(s...
"""Private module for the DataIO class.""" import json import logging import warnings from collections import OrderedDict from copy import deepcopy from datetime import datetime from pathlib import Path from typing import Tuple import numpy as np import pandas as pd try: import pyarrow as pa except ImportError: HAS...
are stored # percent is a value between 0 and 1 # The lowest value is taken valueArray = numpy.sort(valueArray) index = (valueArray.size * percent) - 1 ceilIndex = int(math.ceil(index)) return round(valueArray[ceilIndex], self.numberOfDecimals) def computeAll(self, fieldArray, fieldState, ROIArray): bool, arra...
<reponame>Rakaneth/python-tcod """This module handles backward compatibility with the ctypes libtcodpy module. """ from __future__ import absolute_import as _ import os import sys import threading as _threading from typing import Any, AnyStr, Optional, Sequence, Tuple import warnings import numpy as _np import nump...
*********** path : string, path to file Returns: ******** prod_array : array-like, the visibility products. """ # If given list of files, use first one: if isinstance(path, list): path = path[0] # Get file with single time, single frequency: data_aux = andata.AnData.from_acq_h5(path, start=0, stop=1, freq_...
and if there is one, # have it return to 00 instead of unspecified self.arp_mod = arp if arp: self.last_arp = self.last_arp or '00' arp = arp or self.arp_mod or self.last_arp return self.fixup_downward_arp(notenum, arp) pitchRE = re.compile(r""" (>*|<*) # MML style octave ([a-hrwlq]) # note name (b|bb|-|--|es|e...
import os.path import sys import numpy as np import copy import shutil import astropy.units as u import pandas as pd import pickle from sklearn.neighbors import BallTree import time from nexoclom import math as mathMB from nexoclom.atomicdata import gValue from nexoclom.modelcode.input_classes import InputError from ne...
<reponame>FeralFlows/pysedsim # -*- coding: utf-8 -*- ''' Module imports and exports data inputs and outputs to and from PySedSim. Contains numerous functions to do this. ''' # Import relevant libraries from __future__ import division from openpyxl import load_workbook # Purpose: load excel workbooks from datetime...
passed as None. If None then use the engine's default config script name. @type configScriptName: string or None @param keywords: Keywords used to filter the set of variants the script will be executed with. @type keywords: dictionary of string -> string or list of string @return: A task that will complete whe...
<gh_stars>1-10 import re def br(**kwargs): args = ' '+' '.join([re.sub('_','','{}="{}"'.format(s,kwargs[s])) for s in [ ss for ss in kwargs.keys()]]) args = args[:-1] if args[-1:]==' ' else args return '<br{}>\n'.format(args) def img(**kwargs): args = ' '+' '.join([re.sub('_','','{}="{}"'.format(s,kwargs[s])) for s...
import os,sys,math import numpy import random import time import pglobals import pio import copy import inspect import timeit try: from collections import defaultdict except: pass from scipy.optimize import * from scipy.linalg import * import pminimise def printl(*args): if(pio.verbose): frm = inspect.stack()[1] ...
properties # The task type string. self.task_type = task_type # Member ID of the discord user that owns this schedule. self.owner_id = owner_id # Guild ID of the guild this schedule was created in. self.guild_id = guild_id # Schedule string for this schedule. Determines the time that this # job ...
if executor: target = executor.get_all_targets() source = executor.get_all_sources() cmd_list, ignore, silent = self.process(target, list(map(rfile, source)), env, executor) # Use len() to filter out any "command" that's zero-length. for cmd_line in filter(len, cmd_list): # Escape the command line for the interp...
<gh_stars>0 import pandas as pd import numpy as np from warnings import warn from pandas.core.internals import SingleBlockManager, BlockManager use_pandas_metadata = True class Range: """ A class defining a range to restrict analyses. This is used as a context manager, taking a :func:`~neuroseries.interval_set.I...
<gh_stars>0 # coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload fr...
import opentracing from opentracing import ( child_of, Format, InvalidCarrierException, UnsupportedFormatException, SpanContextCorruptedException, ) import ddtrace from ddtrace.ext.priority import AUTO_KEEP from ddtrace.opentracer import Tracer, set_global_tracer from ddtrace.opentracer.span_context import SpanCo...
r"[boxy] -- B4 -- [disky]" else: cosHarmonicLabel = "B%1d" % m if xtitle is None: if plotList: unitName = efit[0].sma_units else: unitName = efit.sma_units xLabelString = "Semi-major axis [" + unitName + "]" else: xLabelString = xtitle if noErase is False: plt.clf() if merge is True: ax1 = pl...
# Built-in import copy import logging import time # External from Qt.QtWidgets import QUndoCommand # Internal from nxt_editor import colors from nxt_editor import user_dir from nxt import nxt_path from nxt.nxt_layer import LAYERS, SAVE_KEY from nxt.nxt_node import (INTERNAL_ATTRS, META_ATTRS, get_node_as_dict, list_...
Y.values, feature_names=X.columns) del X del Y gc.collect() t1 = time() print("=> xgboost: Performing cross validation") # def decay_eta(boosting_round, num_boost_round): # @todo cv_xgb = xgb.cv(params, train_data, num_boost_round=max_rounds, nfold=3, metrics=('logloss'), stratified=True, seed=0, fpreproc...
"""TestAuthZ implementations of grading.GradeSystem""" import datetime import pytest from tests.utilities.general import is_never_authz, is_no_authz, uses_cataloging from dlkit.abstract_osid.authorization import objects as ABCObjects from dlkit.abstract_osid.authorization import queries as ABCQueries from dlkit.abstra...
#! /usr/bin/env python """ WFIRST Infrared Nearby Galaxies Test Image Product Simulator Produces input files for the WFIRST STIPS simulator """ import time import subprocess import resource import gc import numpy as np from astropy import wcs from astropy.io import fits, ascii from astropy.table import Table import das...
"""new experimental paragraph implementation Intended to allow support for paragraphs in paragraphs, hotlinks, embedded flowables, and underlining. The main entry point is the function def Paragraph(text, style, bulletText=None, frags=None) Which is intended to be plug compatible with the "usual" platypus paragraph ...
save_output=save_output, output_format=output_format, structure_style="filenames", ) def test_list_token_pattern_2_nistxml_sv_iv_list_token_pattern_3_1(mode, save_output, output_format): r""" Type list/token is restricted by facet pattern with value \d{1,5}_([A- Z][a-z]{1,20}_){2}Street_([A-Z][a-z]{1,20}_){3},_...
#https://nbviewer.org/github/amanchadha/coursera-deep-learning-specialization/blob/master/C5%20-%20Sequence%20Models/Week%201/Building%20a%20Recurrent%20Neural%20Network%20-%20Step%20by%20Step/Building_a_Recurrent_Neural_Network_Step_by_Step.ipynb ########################################### # exercise 3 - lstm_cell_fo...
for x in X): if self.params["compTabFormat"]: raise TypeError("If 'compTabFormat' is True. X must be a path to a folder. Either set compTabFormat to False or provide a path.") print("Multiple dataset detected - each one will be analysed separetely") if self.params["analysisName"] is None or not isinstance(self.para...
<reponame>uk-gov-mirror/dwp.dataworks-snapshot-sender-status-checker<gh_stars>0 #!/usr/bin/env python3 import unittest import pytest import argparse import json import prometheus_client from copy import deepcopy from unittest import mock from status_checker_lambda import status_checker EXPORTING_STATUS = "Exporting"...
from guppy.heapy.test import support PORTABLE_TEST = 1 # Relax tests to be more portable class TestCase(support.TestCase): def setUp(self): support.TestCase.setUp(self) self.View.is_rg_update_all = False self.US = US = self.heapy.UniSet self.Use = Use = self.heapy.Use Use.reprefix = 'hp.' self.do = lambda x...
New Logic: Attachments must all have counters so know if txt or bny format for attachments. So even when framed==True must still have counters. """ parsator = self.allParsator(ims=ims, framed=framed, pipeline=pipeline, kvy=kvy, tvy=tvy, exc=exc, rvy=rvy, vry=vry) while True: try: next(parsator) except S...
0.00000, 0.80392), (0.23137, 0.00000, 0.80392), (0.23137, 0.00000, 0.80392), (0.00000, 0.00000, 0.97647), (0.00000, 0.00000, 0.97647), (0.00000, 0.00000, 0.97647), (0.00000, 0.00000, 0.97647), (0.00000, 0.00000, 0.97647), (0.00000, 0.00000, 0.97647), (0.00000, 0.00000, 0.97647), (0.00000, 0.00000, 0.97647), ...
<reponame>gautelinga/-BERNAISE<filename>solvers/basic.py """This module defines the basic solver. Binary electrohydrodynamics solved using a partial splitting approach and linearisation. The problem is split between the following subproblems. * PF: The phase-field equation is solved simultaneously with the phase-fiel...
is not run through library's validation logic. Args: soap_message: str SOAP XML message. url: str URL of the API service for the method to call. server: str API server to access for this API call. http_proxy: str HTTP proxy to use for this API call. Returns: tuple Response from the API method (SOAP XML respon...
import os import gzip from xml.etree import cElementTree as ElementTree import pandas as pd from docx import Document # from python-docx package class XmlDictConfig(dict): """ Note: need to add a root into if no exising Example usage: >>> tree = ElementTree.parse('your_file.xml') >>> root = tree.getroot() >>> x...
IOD': ['Image'], None: ['Image', 'Raw Data', 'Waveform', 'Document', 'Dose', 'Segmentation'], 'SEGMENTATION IOD': ['Segmentation'], 'BASIC VOICE AUDIO IOD': ['Waveform'], 'OPHTHALMIC PHOTOGRAPHY 16 BIT IMAGE IOD': ['Image'], 'MULTI-FRAME GRAYSCALE BYTE SC IMAGE IOD': ['Image'], 'GENERAL ECG IOD': ['Waveform'], '...
<gh_stars>1-10 """ Siamese neural networks for GAN evaluation, this code defines the following classes: - `SiameseDataset`, a class to prepair the dataset for training - `Model`, The neural network model used in Siamese architecture - `ContrastiveLoss`, The specific loss function object used to train the Siamese ar...
None: for wrapper in wrappers: wrapper.apply(self) router.append(self) return Router(router) else: if is_global and (guild_ids is not None): raise TypeError( f'`is_guild` and `guild` contradict each other, got is_global={is_global!r}, ' f'guild={guild!r}' ) if command is None: sub_commands = {} command_...
import math import cmath import numpy as np import sys import os import json import collections sys.path.append('/usr/src/gridappsd-python') from gridappsd import GridAPPSD prefix17 = ''' PREFIX r: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX c: <http://iec.ch/TC57/2012/CIM-schema-cim17#> ''' prefix_cim100...
depth1.append(moves) if re.match('\+B', Bboard.b6d)and b8b==''\ and board.s7c=='': moves = '6d8b' kaihimore(moves) if oute.oute == 0: depth1.append(moves) if re.match(r'\+B|B', Bboard.b6d)and b4f==''\ and board.s5e=='': moves = '6d4f' kaihimore(moves) if oute.oute == 0: depth1.append(moves) if re.match(r'\...
import pkg_resources try: pkg_resources.get_distribution('numpy') except pkg_resources.DistributionNotFound: numpyPresent = False print("Error: Numpy package not available.") else: numpyPresent = True import numpy as np try: pkg_resources.get_distribution('pandas') except pkg_resources.DistributionNotFound: p...
= URIRef(value) return predicate @staticmethod def from_rdf(g: Graph, parent: Union[BNode, URIRef] = None) -> Set[TermMap]: term_maps = set() query = prepareQuery( """ SELECT DISTINCT ?tripleMap ?predicateMap ?reference ?template ?constant WHERE { ?tripleMap rr:predicateMap ?predicateMap OPTIONAL{?predica...
# -*- coding: future_fstrings -*- from __future__ import print_function import argparse import struct import sys import logging from libptmalloc.frontend import printutils as pu from libptmalloc.ptmalloc import malloc_chunk as mc from libptmalloc.ptmalloc import malloc_state as ms from libptmalloc.ptmalloc import ptm...
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @Title :图片处理工具类 @File : image_util.py @Time : 2019/11/7 5:25 下午 @Version : 1.0 ''' import cv2 import os, math import numpy as np import random from PIL import Image, ImageDraw, ImageFile from app.main.app.utils import text_util ImageFile.LOAD_TRUNCATED_IMAGES = True...
Als uw partner 1♣ opent betekent dat dat hij of een erg gebalanceerde kaart heeft, of klaveren. Idealiter vertelt u eerst uw hoge kleuren maar soms is dat gewoon geen optie dus kunt u als u een vijfkaart heeft of een vierkaart met in de rest van de kleuren een driekaart uw partners klaveren steunen. ''' if state =...
download if possible (remote has refs) self.replace_mirrorrepo_from_remote_deposit_if_needed() # reevaluate existing_repo = GitRepo.is_valid(self._mirrorrepodir) else: # we have nothing local, pull from the remote, because it # reports stuff to exist self.replace_mirrorrepo_from_remote_deposit() existing_repo =...
@", Path(self.fname).absolute().as_uri()) else: print(f"Nothing to be saved by GIF writer.") return self.fname class GIFFileBased(GenericSave): def __init__(self, fps=4, dpi=100, bitrate=1800, _type='GIFFileBased', **kwargs): super().__init__(**kwargs) from matplotlib.animation import ImageMagickWriter as Write...
''' Other Functions This is a collection of several other functions that did not otherwise fit within their own module. Included functions are: similar_distributions - finds the parameters of distributions that are similar to the input distribution and plots the results. convert_dataframe_to_grouped_lists - groups val...
""" Train a recurrent neural network using minibatch stochastic gradient descent with the modifications described in On the difficulty of training recurrent neural networks. <NAME>, <NAME>, & <NAME>, ICML 2013. https://github.com/pascanur/trainingRNNs """ from __future__ import absolute_import from __future__ imp...
. I1IiiI * iIii1I11I1II1 / Ii1I . I1IiiI if 63 - 63: ooOoO0o . Ii1I - I1Ii111 - oO0o * I1Ii111 + ooOoO0o o00OoOO0O0 = "ip route | egrep 'default via'" I1III = commands . getoutput ( o00OoOO0O0 ) . split ( "\n" ) if 85 - 85: II111iiii + I1ii11iIi11i oOo0OO00oo0 = [ ] for IIIiIi1iI1i1 in I1III : if ( IIIiIi1iI1i1 ...
"""Test logic blocks.""" from mpf.tests.MpfFakeGameTestCase import MpfFakeGameTestCase from mpf.tests.MpfTestCase import test_config_directory class TestLogicBlocks(MpfFakeGameTestCase): def get_config_file(self): return 'config.yaml' def get_machine_path(self): return 'tests/machine_files/logic_blocks/' def ...
<filename>deepcell_toolbox/metrics.py # Copyright 2016-2021 The <NAME> at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache Licens...
if question_name_parsed == question["nameFull"]: answer_free_text = answer_current for attribute, value in question.items(): if attribute == 'answers': values = [] labels = [] for index, answer in enumerate(value): values.append(str(index)) labels.append(answer) row['question_answers_values'] = ':::'.join(val...
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2022 # <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Software Foundation, either ...
<filename>tests/unit/test_client.py # Copyright 2014 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 applicabl...
[0.26, 0.27, 0.28, 0.28, 0.28, 0.28, 0.28, 0.29, 0.29, 0.29, 0.3 , 0.3 , 0.31, 0.32, 0.33, 0.35, 0.36, 0.37, 0.39, 0.4 , 0.41, 0.42, 0.43, 0.44, 0.44, 0.45, 0.45, 0.45, 0.46, 0.46, 0.46, 0.46, 0.46, 0.47, 0.47, 0.47, 0.47, 0.48, 0.48, 0.49, 0.49, 0.5 , 0.51, 0.52, 0.53, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55,...
= 54 Const = 55 Continue = 56 Declare = 57 Default = 58 Do = 59 DoubleCast = 60 DoubleType = 61 Echo = 62 Else = 63 ElseIf = 64 Empty = 65 EndDeclare = 66 EndFor = 67 EndForeach = 68 EndIf = 69 EndSwitch = 70 EndWhile = 71 Eval = 72 Exit = 73 Extends = 74 Final = 75 Finally = 76 FloatCast = 77 F...
<filename>src/dominh/__init__.py # Copyright (c) 2020-2021, <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 required by applic...
""" Module to write setpoint commands to a GridLAB-D model (.glm) NOTE: This module is in 'prototype' mode. As such, it certainly isn't optimally efficient. Created on Jul 27, 2017 @author: thay838 """ import re import os import helper import csv import copy # Time formatting: TIME_FMT = "%Y-%m-%d %H:%M:%S" # Def...
<reponame>aliyun/dingtalk-sdk<filename>dingtalk/python/alibabacloud_dingtalk/workflow_1_0/models.py # -*- coding: utf-8 -*- # This file is auto-generated, don't edit it. Thanks. from Tea.model import TeaModel from typing import List, Dict, Any class SelectOption(TeaModel): def __init__( self, key: str = None, val...
+ m.b24 - m.b25 <= 0) m.c377 = Constraint(expr= - m.b1 + m.b4 - m.b26 <= 0) m.c378 = Constraint(expr= - m.b1 + m.b6 - m.b27 <= 0) m.c379 = Constraint(expr= - m.b1 + m.b8 - m.b28 <= 0) m.c380 = Constraint(expr= - m.b1 + m.b10 - m.b29 <= 0) m.c381 = Constraint(expr= - m.b1 + m.b12 - m.b30 <= 0) m.c382 = Constraint(...
else [0, 0, 0] # Process and output def _ShowAverageFrame(n, f): text = "" if sNumPlanes == 1: average = f.props.PlaneAverage * valueRange + offset[0] text += "PlaneAverage[{plane}]={average}".format(plane=0, average=average) else: for p in range(sNumPlanes): average = f[p].props.PlaneAverage * valueRange + ...
if self.preprocessed: tokens[pos] = self.indexer(tokens[pos]) masked_weights = [1]*len(masked_tokens) # Token Indexing #to-check if not self.preprocessed: input_ids = self.indexer(tokens) masked_ids = self.indexer(masked_tokens) else: input_ids = tokens[:] masked_ids = masked_tokens[:] # Zero Padding n_p...
collector ndarray if nodata: window=np.full((bbands,crop_win[2],crop_win[3]), nodata, dtype) else: window=np.empty((bbands,crop_win[2],crop_win[3]), dtype) wxind=np.arange(crop_win[0],crop_win[0]+crop_win[2]) wyind=np.arange(crop_win[1],crop_win[1]+crop_win[3]) # override classic bottom-left corner coord system...
""" Script to store all functions""" import numpy as np #from osgeo.gdalconst import * #from osgeo import ogr, gdal import subprocess import simplekml import sys import scipy import multiprocessing as mp from scipy import ndimage import os #import cv2 #import multiprocessing as mp import matplotlib.pyplot as plt from ...
<filename>synapse/groups/groups_server.py # -*- coding: utf-8 -*- # Copyright 2017 Vector Creations Ltd # Copyright 2018 New Vector Ltd # Copyright 2019 <NAME> <<EMAIL>> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtai...