input
stringlengths
2.65k
237k
output
stringclasses
1 value
<filename>ibm_watson/text_to_speech_v1.py # coding: utf-8 # (C) Copyright IBM Corp. 2015, 2020. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
style="color:#00C000"><b>default</b></span>: false).</li> <li><b>tf_log_level</b> (<i>int >= 0</i>) &ndash; TensorFlow log level, additional C++ logging messages can be enabled by setting os.environ["TF_CPP_MIN_LOG_LEVEL"] = "1"/"2" before importing Tensorforce/TensorFlow (<span style="color:#00C000"><b>default</b>...
# -*- coding: utf-8 -*- """ Calculate pair distribution functions. """ MINDISTANCE = 2.0 # shorter distances are ignored PDFCUTOFF = 1.0 # g(r) = 0 if r < PDFCUTOFF __all__ = ["PDF"] import numpy as np import math from util.logger import Logger import sys from core.calculation.discretization import Discretization...
<filename>server_class.py """reads Requests from the server and handles method calls """ import os from server_logic import Adminservices from server_logic import Userservices class Server: """ File management for server Attributes: -------------- username : string stores username password : string...
`false`. """ return pulumi.get(self, "include_control_details") @property @pulumi.getter(name="includeNullAndEmpty") def include_null_and_empty(self) -> Optional[bool]: """ Include NULL and empty columns for records migrated to the endpoint. The default is `false`. """ return pulumi.get(self, "include_null_an...
= x0+w//2 i1 = int(x1+0.5) i2 = int(x2+0.5) if i2 >= n : i2 = n-1 i1 = i2-w+1 if i1 < 0 : i1 = 0 i2 = i1+w-1 xx = x[i1:i2+1] yy = y[i1:i2+1] coef,cov = optimize.curve_fit (quadratic_func,xx,yy) c,b,a = coef # BACKWARDS! # CHECK THAT THE SOLUTION YIELDS A POSITIVE PEAK if (positive and b <= 0.0) or ...
<filename>pymc4/random_variables/continuous.py """ PyMC4 continuous random variables. Wraps selected tfp.distributions (listed in __all__) as pm.RandomVariables. Implements random variables not supported by tfp as distributions. """ # pylint: disable=undefined-all-variable import tensorflow_probability as tfp from te...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02_data.ipynb (unless otherwise specified). __all__ = ['VIIRS750_download', 'BandsFilter', 'BandsRename', 'MergeTiles', 'BandsAssertShape', 'ActiveFires', 'MirCalc', 'BaseDataset', 'Viirs750Dataset', 'MCD64Dataset', 'FireCCI51Dataset', 'AusCoverDataset', 'MTBSDataset',...
if filetable2 != None: self.reduced_variables[varid+'_2'] = reduced_variable( variableid = vbase, filetable=filetable2, reduced_var_id = varid+'_2', reduction_function=(lambda x, vid: reduce2latlon_seasonal_level(x, self.season, num, vid))) self.composite_plotspecs = {} self.single_plotspecs={} self.single_plots...
"""相対時間の抽出・正規化処理を定義するモジュール.""" from copy import deepcopy from typing import List, Tuple from pynormalizenumexp.expression.base import INF, NNumber, NTime, NumberModifier from pynormalizenumexp.expression.reltime import ReltimeExpression, ReltimePattern from pynormalizenumexp.utility.dict_loader import DictLoader from...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
автоматическом режиме маршрутизатор будет динамически регулировать распределение полосы пропускания в соответствии с текущим использованием сети, чтобы обеспечить бесперебойную работу сети' }, '优先级模式下路由器会动态调整带宽分配,保证优先级较高的设备网络体验流畅': { 'en': 'In priority mode, the router will dynamically adjust the bandwidth allocatio...
<reponame>pulumi/pulumi-rancher2 # 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, Sequenc...
= self.trajevents[self._FScompatibleNames(evnames)] except AttributeError: # empty pointset return None else: result.indepvararray += t_offset return result else: # assume a sequence of strings assert all([ev in compat_evnames for ev in evnames]), \ "Invalid event name(s) provided: %s"%str(evnames) result = ...
# -*- coding: utf-8 -*- import scrapy import re from .. import items from bs4 import BeautifulSoup from selenium import webdriver from requests import get from time import sleep # change this path to wherever the chrome webdriver is located in your system WEBDRIVER_PATH = ("D:\\chromedriver_win32\\" + "chromedriver.ex...
not specified then an attempt will be made to find a model corresponding to the current dataset name, `'model_' + self.dataset.name + '.pkl'`. If there is no current dataset then the most recent model will be loaded. This method is only intended to be used to deserialise models created by this interactive Jupyter ...
#: greenygrey: str = "#7ea07a" #: greenyyellow: str = "#c6f808" #: grey: str = "#929591" #: greyblue: str = "#647d8e" #: greybrown: str = "#7f7053" #: greygreen: str = "#86a17d" #: greyish: str = "#a8a495" #: greyishblue: str = "#5e819d" #: greyishbrown: str = "#7a6a4f" #: greyishgreen: str = "#82a67d" #: gr...
from fastai.torch_core import * from fastai.basic_train import * from fastai.callbacks import * from fastai.data_block import CategoryList from fastai.basic_data import * from fastai.datasets import * from fastai.metrics import accuracy from fastai.train import GradientClipping from fastai.layers import * from fastai.t...
% period - tse0 % period) / 0.01#**2 def flatbottom(x, y, sep, swidth): check = (x<sep+swidth/3.) * (x>sep-swidth/3.) grady = np.gradient(y) grady_m = np.polyfit(x[check], grady[check], 1)[0] if abs(grady_m)<0.1: return 0.01 elif abs(grady_m)>10.: return 0.4 else: return 0.1 def guess_rrat(sdep, pdep): if (...
#!/usr/bin/env python2 # # xpyBuild - eXtensible Python-based Build System # # Copyright (c) 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors # Copyright (c) 2013 - 2018 <NAME> and <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance...
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Mon Mar 28 14:11:31 2016 @author: adam """ import matplotlib.pyplot as plt import numpy as np from datetime import datetime from scipy.signal import argrelextrema from sklearn import neighbors as nb from sklearn.gaussian_process import GaussianProcess from scip...
for this Project': 'No Organisations for this Project', 'No Packs for Item': 'No Packs for Item', 'No Patients currently registered': 'No Patients currently registered', 'No People currently committed': 'No People currently committed', 'No People currently registered in this camp': 'No People currently registered in th...
'chrUn_JTFH01000337v1_decoy', 'chrUn_JTFH01000338v1_decoy', 'chrUn_JTFH01000339v1_decoy', 'chrUn_JTFH01000340v1_decoy', 'chrUn_JTFH01000341v1_decoy', 'chrUn_JTFH01000342v1_decoy', 'chrUn_JTFH01000343v1_decoy', 'chrUn_JTFH01000344v1_decoy', 'chrUn_JTFH01000345v1_decoy', 'chrUn_JTFH01000346v1_decoy', 'chrUn_JTF...
x, y, triangles, _, dataIndex = createTriangles(mesh) if len(data) == mesh.cellCount(): z = data[dataIndex] else: z = data gci = None if levels is None: levels = autolevel(data, nLevs, zMin=cMin, zMax=cMax, logScale=logScale) if len(z) == len(triangles): shading = kwargs.pop('shading', 'flat') # bounds ...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # # # The code is hosted on GitHub at https://github.com/aiidateam/aiida-core # # For further information on the license, s...
"09", # noqa: E501 } read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """JobSearchResponseAggregierungenPlzebene2 - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters i...
<reponame>RoryKurek/thermo<filename>thermo/phases/iapws_phase.py # -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2019, 2020 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated...
<filename>main/main.py # src: https://github.com/facebookresearch/DrQA/blob/master/scripts/reader/train.py import sys sys.path.append(".") sys.path.append("..") import os import json import torch import logging import subprocess import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt i...
<reponame>mklewitz-kisura/dotfiles<gh_stars>0 """ The :mod:`jedi.api.classes` module contains the return classes of the API. These classes are the much bigger part of the whole API, because they contain the interesting information about completion and goto operations. """ import warnings import re from jedi._compatibi...
late, or haven't shipped on_time = orders_due[np.where((orders_due[:,env.ob_indices['shipped']]==1) & (orders_due[:,env.ob_indices['on_time']]==1))].shape[0] late = orders_due[np.where((orders_due[:,env.ob_indices['shipped']]==1) & (orders_due[:,env.ob_indices['on_time']]==-1))].shape[0] not_shipped = orders_due[n...
<gh_stars>10-100 # AUTORIGHTS # --------------------------------------------------------- # Copyright (c) 2017, <NAME> # # This file is part of the VCOCO dataset hooks and is available # under the terms of the Simplified BSD License provided in # LICENSE. Please retain this notice and LICENSE if you use # this fil...
+ kDrawPointTag + "BCPMarks = 0") exec("params." + kDrawPointTag + "PointLabels = 0") exec("params." + kShowMetaTag + "Outline = 0") # shows filled outline in lower right of meta data area under glyph outline. exec("params." + kShowMetaTag + "Name = 1") exec("params." + kShowMetaTag + "BBox = 0") exec("p...
0x111][0][0x300a, 0x11a][1][0x300a, 0x11c].value # ssd = data[0x300a, 0xb0][2][0x300a, 0x111][0][0x300a, 0x130].value/10 # energy = data[0x300a, 0xb0][2][0x300a, 0x111][0][0x300a, 0x114].value # leaf_bou = data[0x300a, 0xb0][2][0x300a, 0xb6][2][0x300a, 0xbe].value # depth = 100 - ssd # leaf_pos = np.reshape(lea...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ----------------------------------------------...
data features # def Overall_Correlations(self, save_folder_path, Font_Size, colours): # create the correlation dataset (subset from the original data) self.corr_df = DataUpload.recall_dataframe(1)[['dx', 'dx_type', 'age', 'sex','localization']] self.header_list = self.corr_df.columns.values.tolist() self.he...
property constructs an averaging operator that maps scalar quantities from cell centers to edge. This averaging operator is used when a discrete scalar quantity defined cell centers must be projected to edges. Once constructed, the operator is stored permanently as a property of the mesh. *See notes*. Returns --...
<gh_stars>0 import xml.etree.cElementTree as ET import time import datetime import random from pathlib import Path from zipfile import ZipFile import os import copy from shutil import rmtree import string import json from components.dataconnection.index import get_resource_description, get_resource_metadata from x5gon...
"""Test bpack field descriptors.""" import sys import enum from typing import List import pytest import bpack from bpack.descriptors import get_field_descriptor class TestFieldFactory: @staticmethod def test_base(): bpack.field(size=1, offset=0, signed=False, default=0, repeat=1) @staticmethod def test_fiel...
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 question_data = { "AssessmentA": [{ "name": "<NAME>", # noqa: E501 "question": "You have effective organisational security management led at board level and articulated clearly " "in corresponding policies.", # noqa: E501 "a...
v)][i + 1] - 1] > 0: decomp.add_edge(v, u) edge_add = True if not edge_add: if level_i != []: level_u = 1e9 #g.number_of_nodes() v_u = -1 for v in decomp.nodes(data=True): if v[0] == u: continue if out[s[min(u, v[0])][max(u, v[0])][v[1]['level']] - 1] > 0: if level_u > v[1]['level']: level_u = v[1]['level']...
<reponame>dllehr-amd/pytorch # Owner(s): ["module: sparse"] import torch import warnings import unittest import random import itertools from torch.testing import get_all_complex_dtypes, get_all_fp_dtypes, make_tensor from torch.testing._internal.common_cuda import SM53OrLater, SM80OrLater, TEST_CUSPARSE_GENERIC from t...
#!/usr/bin/env python3 import json from time import time, sleep # only use the function that gives the current time import random import sys from cscore import CameraServer, VideoSource, UsbCamera, MjpegServer from networktables import NetworkTablesInstance import ntcore import numpy as np import cv2 from enum import...
graph.plot(xm,yp,'r') plt.setp(graph.get_xticklabels(), rotation=30, ha="right") ln1 = len(xm) if ln1<10: graph.xaxis.set_major_locator(plt.LinearLocator(numticks=ln1)) graph.yaxis.set_major_locator(plt.LinearLocator(numticks=ln1)) else: graph.xaxis.set_major_locator(plt.MaxNLocator(10)) graph.yaxis.set_major_l...
<filename>implementation.py from heapq import heappush, heappop from itertools import count from itertools import permutations from collections import defaultdict from itertools import chain, combinations from functools import reduce import copy from collections import deque import signal class GracefulKiller:...
from cloudshell.shell.core.driver_context import ResourceCommandContext, AutoLoadDetails, AutoLoadAttribute, \ AutoLoadResource from collections import defaultdict class LegacyUtils(object): def __init__(self): self._datamodel_clss_dict = self.__generate_datamodel_classes_dict() def migrate_autoload_details(self...
) # @TODO implement objectivum_formato as default # commune.add_argument( # '--codex-de', # help='Generate documentation of dictionaries', # # metavar='', # dest='codex_de', # # const=True, # nargs='?' # ) commune.add_argument( '--punctum-separato-de-resultatum', help='Character(s) used as separator for ...
# Copyright (c) 2017-2021 <NAME> (<EMAIL>) """ @author: <NAME> CG model selection via MAP-estimation using mean parameters. """ import numpy as np from numpy import ix_ from cgmodsel.base_solver import BaseCGSolver # pylint: disable=W0511 # todos # pylint: disable=R0914 # too many locals class MAP(BaseCGSolver): ...
# -*- coding:UTF-8 -*- from copy import deepcopy from getpass import getuser as GETPASSgetuser from cdms2 import open as CDMS2open from inspect import stack as INSPECTstack import json from numpy import array as NUMPYarray from os import environ as OSenviron from os.path import join as OSpath__join from sys import exi...
Co., Ltd.", "0016DC": "ARCHOS", "0016DD": "Gigabeam Corporation", "0016DE": "FAST Inc", "0016DF": "Lundinova AB", "0016E0": "3Com Ltd", "0016E1": "SiliconStor, Inc.", "0016E2": "American Fibertek, Inc.", "0016E3": "ASKEY COMPUTER CORP.", "0016E4": "VANGUARD SECURITY ENGINEERING CORP.", "0016E5": "FO...
# quad1m = ax.pcolormesh(kzg_interp, -1 * kxg_interp, PhDen_interp_vals[:-1, :-1], norm=colors.LogNorm(vmin=1e-3, vmax=vmax), cmap='inferno') # else: # quad1 = ax.pcolormesh(kzg_interp, kxg_interp, PhDen_interp_vals[:-1, :-1], vmin=vmin, vmax=vmax, cmap='inferno') # quad1m = ax.pcolormesh(kzg_interp, -1 * kxg_interp...
= self.RegionPlaceholders.query.all() for region in region_placeholders: regions_maps.update(region.countries) # getting country groups from database and insert into the country_groups list customer_loc = '' location_list = json_template["conductor_solver"]["locations"] for location_id, location_info in location...
from abc import abstractmethod import pandas as pd from aistac.components.abstract_component import AbstractComponent from aistac.components.aistac_commons import DataAnalytics from ds_discovery.components.commons import Commons from ds_discovery.components.discovery import DataDiscovery, Visualisation __author__ = '...
*xs): (k, *tuple(df[k].dtype.type(x) for x in xs))) .T.set_index([k for k, f in stats + prototypes], append=True).T # Transpose for fixed width (stats) and variable height (input cols) # - [Nope: transposing cols mixes dtypes such that mixed str/int/float undermines display.precision smarts] # .T ) def _df_quant...
if not annot_obj: self.logger.error('Cannot conver this string to annotation object: '+str(annotation)) return False #### retreive the annotation object brsynth_annot = None obj_annot = sbase_obj.getAnnotation() if not obj_annot: sbase_obj.setAnnotation(libsbml.XMLNode.convertStringToXMLNode(self._defaultBRSynth...
<reponame>Andrew-Brown1/Smooth_AP # repo originally forked from https://github.com/Confusezius/Deep-Metric-Learning-Baselines ################# LIBRARIES ############################### import warnings warnings.filterwarnings("ignore") import numpy as np, pandas as pd, copy, torch, random, os from torch.utils.data i...
nlst, ndays, ntriads, nlags) ------------------------------------------------------------------------ """ try: bw_eff except NameError: raise NameError('Effective bandwidth must be specified') else: if not isinstance(bw_eff, (int, float, list, NP.ndarray)): raise TypeError('Value of effective bandwidth m...
nocc: , : , : ].transpose(2,0,3,1))) if (fully_ic): numpy.save(intfolder+"W:eaaa", numpy.asfortranarray(eris['ppaa'][nocc: , ncor:nocc, : , : ].transpose(0,2,1,3))) numpy.save(intfolder+"W:caaa", numpy.asfortranarray(eris['ppaa'][nfro:ncor, ncor:nocc, : , : ].transpose(0,2,1,3))) # 2 "E" numpy.save(intfolder+"W:ee...
from sage.misc.flatten import flatten from sage.ext.fast_callable import fast_callable from sage.rings.semirings.non_negative_integer_semiring import NN from sage.rings.real_mpfr import RealField from sage.misc.functional import numerical_approx as N from sage.functions.log import exp from sage.functions.log import log...
# 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 from .. import _utilitie...
""" A module containing the models to be trained on gene expression data """ import copy import itertools import pickle import sys from abc import ABC, abstractmethod from collections import OrderedDict from typing import Union, Iterable, Tuple, Any import neptune.new as neptune import numpy as np import sklearn.line...
<reponame>Flav-STOR-WL/py-pure-client # coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.10 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_i...
} The main payload of the return data can be found inside the 'updates' key, containing a list of dictionaries. This list is always returned in descending date order. Each item may contain different fields depending on their update type. The primary_entity key represents the main Shotgun entity that is associated...
<filename>op3/envs/blocks/mujoco/block_occlusions.py import os import pdb import numpy as np import shutil import pickle import cv2 import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from argparse import ArgumentParser import op3.envs.blocks.mujoco.utils.data_generation_utils as dgu from op3.util....
<filename>y/google-cloud-sdk/lib/googlecloudapis/compute/alpha/compute_alpha_client.py """Generated client library for compute version alpha.""" # NOTE: This file is autogenerated and should not be edited by hand. from googlecloudapis.apitools.base.py import base_api from googlecloudapis.compute.alpha import compute_a...
one value per subject as in self.subject_names_raw -- # # -- NOTE: self.online_eval_XX are lists and conventionally the values are stored in lists. -- # # -- Here we store the values as numpys and transform self.online_eval_XX to a numpy later on -- # # -- for the calculation per subject, thus we need numpy since th...
print('Finised computing mol2cell accuracies.') # Saves results in self.df_c2m for top5 accuracy self.eval_cell2mol_accuracy(mode = mode) self.get_acc_df_cell2mol() print('Finished computing cell2mol accuracies.') # Run KS tests print('Running KS test...') self.run_ks_one_vs_all(n_cores,mode=mode) print('Finish...
range(0, len(x1), 1): # If index of element in mask list form 'outliers_filtering' then replace with median #if i in mask_proc: # print('Replace with median!') req_data = np.array([x1[i], y1[i]]).reshape(1, -1) # Getting number of neighbours num_nn = vector_start_tree.query_radius(req_data, r=radius, count_only=T...
== b"" assert doc_enc["h"]["data"] == b"header" assert doc_dec["h"] == "686561646572" assert doc_enc["t"]["len"] == b"" assert doc_enc["t"]["data"] == b"0210" assert doc_dec["t"] == "0210" assert doc_enc["p"]["len"] == b"" assert doc_enc["p"]["data"] == b"0000000000000000" assert doc_dec["p"] == "000000000000...
created_ts = datetime_to_timestamp(instance.created) for stat in stats: if stat['from'] >= created_ts and stat['to'] - created_ts < hour / 2 and 'value' not in stat: stat['value'] = 0 return Response(stats, status=status.HTTP_200_OK) @detail_route() def calculated_usage(self, request, uuid): """ Find max or mi...
rebooting info printed to the console logger.info('==== Waiting for messages in rebooting ...') d1 = Dialog([ ['{} login: '.format(self.sm.patterns.chassis_hostname), 'sendline({})'.format(self.sm.patterns.chassis_username), None, True, False], ['Password:', 'sendline({})'.format(self.sm.patterns.chassis_passwo...
key ket_size = H_sizes[ket_key] bra_size = H_sizes[bra_key] self.rho_shapes[key] = (ket_size,bra_size) def load_mu(self): """Load the precalculated dipole overlaps. The dipole operator must be stored as a .npz file, and must contain at least one array, each with three indices: (new manifold eigenfunction, ol...
incre(0) len(m) == 2 and abs(m[0] - m[1]) == 0 and m[0] not in self.bonus_winds and incre(3) len(m) == 2 and abs(m[0] - m[1]) == 1 and incre(2 if m[0] % 9 > 0 and m[1] % 9 < 8 else 1) len(m) == 2 and abs(m[0] - m[1]) == 2 and incre(1) len(m) == 3 and incre(5 if m[0] == m[1] else 4) return geo_vec def qh_type(se...
# -*- coding: utf-8 -*- try: from unittest.mock import patch except ImportError: from mock import patch from odoo.tests import common def strip_prefix(prefix, names): size = len(prefix) return [name[size:] for name in names if name.startswith(prefix)] class TestOnChange(common.TransactionCase): def setUp(self)...
be on the X-axis in comparative plots) in comparative analysis plots is determined by the order in PredictionSets assert(take_lowest > 0 and (int(take_lowest) == take_lowest)) assert(0 <= burial_cutoff <= 2.0) assert(stability_classication_experimental_cutoff > 0) assert(stability_classication_predicted_cutoff > 0)...
if 64 - 64: i11iIiiIii if 65 - 65: O0 / iIii1I11I1II1 % OoooooooOO - i1IIi if 73 - 73: II111iiii if 22 - 22: I1IiiI * Oo0Ooo / OoO0O00 . OoOoOO00 . o0oOOo0O0Ooo / I1ii11iIi11i if 48 - 48: oO0o / OOooOOo / I11i / Ii1I if 48 - 48: iII111i % IiII + I1Ii111 / ooOoO0o * Ii1I if 46 - 46: ooOoO0o * I11i - OoooooooOO if 30 - 3...
2)).permute(1, 0, 2) x = self.inner_tf(x) x = einops.rearrange(x, " inner b (outer mod k) -> b outer inner mod k", outer=self.outer, mod=self.mod, b=self.batch) return x class mod_att(nn.Module): def __init__(self, dmodel, pos, inner, outer, modalities, num_layers=1, heads=8): super().__init__() self.pos = pos ...
#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK from __future__ import division, print_function # viability imports import pyviability as viab from pyviability import helper from pyviability import libviability as lv from pyviability import tsm_style as topo # model imports import examples.AWModel as awm import examp...
checked.") print("Apps in", [d.replace(os.environ["HOME"], "~") for d in app_dirs], "\n") maxlen = max(len(x.replace(os.environ["HOME"], "~")) for x in app_dirs) if sum(apps_check["cask"].values()) > 0: print("Installed by Cask:") for d in app_dirs: if apps_check["cask"][d] == 0: continue print("{0:<{1}s} : {...
centers good" print "\n%s result:" % algo, dump_json(a1) # if we want to return the model view like the browser if 1==0: # HACK! always do a model view. kmeans last result isn't good? (at least not always) a = self.kmeans_view(model=a1['model']['_key'], timeoutSecs=30) verboseprint("\n%s model view result:" % al...
request.GET.get('sid', None) from_str = request.GET.get('from', None) to_str = request.GET.get('to', None) from_t = request.GET.get('from_t', None) to_t = request.GET.get('to_t', None) # Set values from POST and GET edit = request.POST.get('edit', None) if not edit: edit = request.GET.get('edit', None) data...
= self.grid(processor) Nc = g.Ncells() cdata = self.celldata(processor) for i in range(Nc): fp.write("%.6f %.6f %.6f %.6f %d %d %d %d %d %d %d %d %d %d %.6f %.6f %.6f\n"%tuple(cdata[i,:])) fp.close() def Nk(self,proc): return self.celldata(proc)[:,4].astype(int32) def Nke(self,proc): return self.edgedata(pro...
# Why: #7737 in Alexa global 'http://www.navy.mil/', # Why: #7738 in Alexa global 'http://www.mg.gov.br/', # Why: #7739 in Alexa global 'http://gizmodo.uol.com.br/', # Why: #7740 in Alexa global 'http://www.psychcentral.com/', # Why: #7741 in Alexa global 'http://www.ultipro.com/', # Why: #7742 in Alexa globa...
if bollo: _bollo = db(db.bolli.descrizione=="Fattura").select().first()["valore"] importo_totale += float(_bollo) importo_totale_da_salvare = importo_totale +imposta_iva if not "/" in pagamento: importo_totale = Money(str(importo_totale),"EUR") importo_totale = importo_totale.format("it...
<reponame>wbiker/rules_dotnet<filename>dotnet/stdlib.net/net472/generated.bzl load("@io_bazel_rules_dotnet//dotnet/private:rules/stdlib.bzl", "net_stdlib") def define_stdlib(context_data): net_stdlib( name = "accessibility.dll", dotnet_context_data = context_data, ref = "@Microsoft.NETFramework.ReferenceAssemblies...
# # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Copyright (C) 2018-2021 UAVCAN Development Team <uavcan.org> # This software is distributed under the terms of the MIT License. # """ jinja-based :class:`~nunavut.generators.AbstractGenerator` implementation. """ import datetime import io i...
<reponame>ravwojdyla/transform<filename>tensorflow_transform/saved/saved_transform_io.py # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
60] 4,840 Conv2d-136 [-1, 40, 44, 60] 4,840 BatchNorm2d-137 [-1, 40, 44, 60] 80 Conv2d-138 [-1, 40, 44, 60] 4,840 Conv2d-139 [-1, 40, 44, 60] 4,840 BatchNorm2d-140 [-1, 40, 44, 60] 80 Dropout2d-141 [-1, 40, 44, 60] 0 EDAModule-142 [-1, 450, 44, 60] 0 EDANetX3Block-143 [-1, 450, 44, 60] 0 Conv2d-144 [-1, 11, 44...
################################################################### # Melissa # #-----------------------------------------------------------------# # COPYRIGHT (C) 2017 by INRIA and EDF. ALL RIGHTS RESERVED. # # # # This source is covered by the BSD 3-Clause License. # # Refer to the LICENCE file for further informatio...
bazbiz(): z = foobar() lala ''') differ.initialize(code1) differ.parse(code2, parsers=2, copies=1) differ.parse(code1, parsers=2, copies=1) def test_one_call_in_function_change(differ): code1 = dedent('''\ def f(self): mro = [self] for a in something: yield a def g(self): return C( a=str, b=self, ) ...
<reponame>WildMeOrg/wbia-utool # -*- coding: utf-8 -*- """ TODO: box and whisker http://tex.stackexchange.com/questions/115210/boxplot-in-latex """ from __future__ import absolute_import, division, print_function, unicode_literals from six.moves import range, map, zip import os import re import textwrap try: import n...
import threading import time import logging import signal import subprocess import Queue import collections import concurrent.futures import shlex import json import tempfile import os import re import builder.futures from builder.util import arrow_factory as arrow import builder.build as build import networkx as nx ...
"goh-lng": "Lombardic", "goi": "Gobasi", "goj": "Gowlan", "gol": "Gola", "gon": "Gondi", "goo": "Gone Dau", "gop": "Yeretuar", "goq": "Gorap", "gor": "Gorontalo", "got": "Gothic", "gou": "Gavar", "gow": "Gorowa", "gox": "Gobu", "goy": "Goundo", "goz": "Gozarkhani", "gpa": "Gupa-Abawa", "gpn": "Taiap", ...
<reponame>ska-telescope/csp-lmc-prototype<filename>csplmc/CspMaster/CspMaster/CspMaster.py # -*- coding: utf-8 -*- # # This file is part of the CspMaster project # # # # Distributed under the terms of the GPL license. # See LICENSE.txt for more info. """ CspMaster Tango device prototype CSPMaster TANGO device class f...
<filename>fcts.py import sys, os, time, datetime, pandas, numpy, pickle, logging, py7zr, base64, io, random from functools import wraps from matplotlib import pyplot as plt def process_figure(out_path, plt): """Show / save / serrialize plot""" if out_path == 'base64': plt.tight_layout() out_path = serial...
value, data)) elif comparator == '>': ok = any(map(lambda x: x is not None and x > value, data)) elif comparator == '<=': ok = any(map(lambda x: x is not None and x <= value, data)) elif comparator == '>=': ok = any(map(lambda x: x is not None and x >= value, data)) elif comparator in ('!=', '<>'): ok = value n...
order='F', copy=copy) def dot(m1, m2, target = None, beta = 0., alpha = 1.): """ Find the dot product between m1 and m2 and store in target: target = beta*target + alpha*(m1 m2) If no target is given, it will be created automatically, but not initialized -- so beta should be left at its default value zero. """ ...
<reponame>lsd-maddrive/adas_system<gh_stars>0 from utils.augmentations import ( Albumentations, augment_hsv, letterbox, random_perspective, ) from utils.general import non_max_suppression, scale_coords import torch import cv2 import numpy as np from torch import nn import random import pandas as pd import matplotl...
__init__( self, symbolic: str = None, nr_components=None, unit_depth_in_bit: int = None, location: _Location = None): # super().__init__( alignment=_Alignment(unpacked=_DataSize.FLOAT32), symbolic=symbolic, nr_components=nr_components, unit_depth_in_bit=unit_depth_in_bit, location=location ) def expand(self...
# Deep Learning optimization functions # # <NAME>, 2021 # <EMAIL> import torch import uproot import numpy as np import sklearn import psutil from termcolor import colored,cprint from matplotlib import pyplot as plt import pdb from tqdm import tqdm, trange import torch.optim as optim from torch.autograd import Vari...
' 'output as \'8 20 2\'', argstr='-roisel %s') debug = traits.Bool( desc='print debug information', argstr='-debug') quiet = traits.Bool( desc='execute quietly', argstr='-quiet') nomeanout = traits.Bool( desc='Do not include the (zero-inclusive) mean among computed stats', argstr='-nomeanout') nobriklab = t...