input
stringlengths
2.65k
237k
output
stringclasses
1 value
(time.time(), shard_key, rpc) rpc.callback = _MakeBackendCallback( _HandleBackendSearchResponse, query_project_names, rpc_tuple, rpc_tuples, settings.backend_retries, unfiltered_iids_dict, search_limit_reached_dict, services.cache_manager.processed_invalidations_up_to, error_responses, me_user_ids, logged_in_user...
500 feature1 = tl.layers.BatchNormLayer(feature1, beta_init = w_init, gamma_init = w_init, is_train = is_train, name='bn1') feature1 = PReluLayer(feature1, channel_shared = True, name='conv1_relu') ''' if config.TRAIN.DROPOUT: feature1 = DropoutLayer(feature1, keep = config.TRAIN.DROPOUT_KEEP, name = 'drop_fe...
= 'WOA_Nitrate' ds_lat = ds_tmp[var2use].dropna(dim='lat', how='all') min_lat = ds_lat['lat'].min() - 2 max_lat = ds_lat['lat'].max() + 2 ds_lon = ds_tmp[var2use].dropna(dim='lon', how='all') min_lon = ds_lon['lon'].min() - 2 max_lon = ds_lon['lon'].max() + 2 # - Now save by species vars2save = [i for i in ds_t...
( x ** (n * (m + 1) - m) * (f(x).diff(x)) - a * f(x) ** n - b * x ** (n * (m + 1)) ) i = infinitesimals(eq, hint="linear") assert checkinfsol(eq, i)[0] @XFAIL def test_kamke(): a, b, alpha, c = symbols("a b alpha c") eq = x ** 2 * (a * f(x) ** 2 + (f(x).diff(x))) + b * x ** alpha + c i = infinitesimals(eq, hin...
= 0 for actor in Characters.query({"online": True}): count += 1 self.echo(f"{{x{actor.stats.level.base:>3} {actor.gender.colored_short_name:>1} {actor.races[0].colored_short_name:>5} {actor.classes[0].colored_short_name} {{x[.{{RP{{x......] {actor.name} {actor.title}") self.echo() self.echo( f"{{GPlayers found: {...
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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, modify,...
<reponame>LiuHao-THU/frame2d """ Time: 2017.12.27 Author: LiuHao Institution:THU """ """ dense net name conv1/bn + conv1/scale + conv1//relu + conv1 + pool2(max) conv2_1/x1.2(/bn+/scale+relu+conv) ... conv2_6/x1.2(/bn+/scale+relu+conv) concat conv2_blk/bn + conv2_blk/scale + conv2_blk/relu + conv2_blk + pool2(avg) con...
<filename>caption_vae/models/transformer.py # -*- coding: utf-8 -*- """ Created on 28 Dec 2020 18:00:01 @author: jiahuei Based on `The Annotated Transformer` https://nlp.seas.harvard.edu/2018/04/03/attention.html """ import logging import math import torch import torch.nn as nn import torch.nn.functional as F from tor...
""" Generated API Documentation for Server API using server_doc_gen.py.""" doc = { "@context": { "ApiDocumentation": "hydra:ApiDocumentation", "description": "hydra:description", "domain": { "@id": "rdfs:domain", "@type": "@id" }, "expects": { "@id": "hydra:expects", "@type": "@id" }, "expectsHeader": "hyd...
#%matplotlib inline import matplotlib.pyplot as plt import tensorflow as tf import numpy as np print(tf.__version__) ## Load Data #The MNIST data-set is about 12 MB and will be downloaded automatically if it is not located in the given dir. from mnist import MNIST data = MNIST(data_dir="data/MNIST/") #The MNIST dat...
<gh_stars>1-10 # -*- coding: utf-8 -*- import os import json import shutil import hashlib import io from django.test import TestCase, RequestFactory from django.urls import reverse from django.template import Template, Context from django.core.exceptions import PermissionDenied from django.contrib.auth import get_use...
<filename>ample/util/tm_util.py<gh_stars>1-10 #!/usr/bin/env ccp4-python from __future__ import division __author__ = "<NAME> & <NAME>" __date__ = "11 Apr 2018" __version__ = 1.1 import itertools import logging import operator import os import random import string import sys import warnings from ample.parsers impor...
#!/usr/bin/python """ Description: Tool for transforming JSON dumps from Sparrow Compiler into Graphviz dot diagrams Copyright (c) 2016, <NAME> """ import os, subprocess, sys, json, argparse, cgi def parseArgs(): def str2bool(v): return v.lower() in ("yes", "true", "t", "1") parser = argparse.ArgumentParser(des...
<gh_stars>10-100 #!/usr/bin/env python # -*- coding: utf-8 -*- # flake8: noqa import argparse import dask import dask.array as da import numpy as np from astropy.io import fits import warnings from africanus.model.spi.dask import fit_spi_components iFs = np.fft.ifftshift Fs = np.fft.fftshift # we want to fall back to...
<gh_stars>0 """Overlapping (non-nested) tandem network.""" from math import inf from typing import List from nc_arrivals.arrival_distribution import ArrivalDistribution from nc_arrivals.regulated_arrivals import DetermTokenBucket from nc_operations.aggregate import AggregateTwo from nc_operations.arb_scheduling impor...
<reponame>neutrinoceros/AMICAL import glob import logging import matplotlib.pyplot as plt import numpy as np import scipy from scipy.io.idl import readsav from termcolor import cprint from . import oifits from .cp_tools import project_cps # import pymask.oifits """---------------------------------------------------...
not " + typeof(fillchar))); } if (this['length'] >= width) return this; return this + new Array(width+1 - this['length'])['join'](fillchar); } pyjslib['String_rjust'] = function(width, fillchar) { if (typeof(width) != 'number' || parseInt(width) != width) { throw (pyjslib['TypeError']("an integer is required"));...
#!/usr/bin/env python try: from cStringIO import StringIO except ImportError: from io import StringIO from io import BytesIO zeroconfExists = False try: from zeroconf import ServiceBrowser, Zeroconf zeroconfExists = True except Exception as e: # print ( e ) zeroconfExists = False import json import inspect im...
<reponame>GreenFarmCsa/greenfarm """ AI API FOR Green Farm BACKEND """ import json import datetime import requests import pandas as pd from flask import Flask, request app = Flask(__name__) aggregated_products = sorted(['Corn', 'Cucumber', 'Tomato', 'Onion', 'Spinach']) aggregated_farm_location = sorted( ...
""" Chi-squared and related functions """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains cer...
<filename>empirical_lsm/plots.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ File: plots.py Author: <NAME> Email: <EMAIL> Github: https://github.com/naught101/empirical_lsm Description: diagnostic plots for evaluating models """ import matplotlib as mpl import matplotlib.pyplot as pl import seaborn as sns impor...
import os.path import random import cv2 import numpy as np import dito.io #### #%%% resource filenames #### RESOURCES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources") RESOURCES_FILENAMES = { # colormaps (self-defined) "colormap:plot": os.path.join(RESOURCES_DIR, "colormaps", "plot.png...
re.sub("’", self.CSQ, common) self.wb[i] = re.sub(r"({}){}({})".format( self.OP, common, self.CP), r"\1{}\2".format(c2), self.wb[i]) for _, common in enumerate(commons_tail): c2 = re.sub("’", self.CSQ, common) self.wb[i] = re.sub(r"({}){}({})".format( self.OP, common, self.CP), r"\1{}\2".format(c2), self.wb[i]) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from pandagg._decorators import Substitution from pandagg.node.query._parameter_clause import ParentParameterClause from pandagg.node.query.abstract import QueryClause, LeafQueryClause, Q from pandagg.node.query.compound import CompoundClause, Bool from pandag...
<gh_stars>0 import base64 import dateutil.parser import email import hashlib import logging import os import re from dateutil import tz from email.header import decode_header, make_header from urlfinderlib import find_urls from lib import RegexHelpers from lib.config import config from lib.constants import HOME_DIR f...
<reponame>drmegannewsome/lcogtsnpipe import sys import os from astropy.io import fits from astropy.nddata import Cutout2D from astropy.wcs import WCS import lsc from glob import glob import pkg_resources workdirectory = os.getenv('LCOSNDIR', '/supernova/') configfile = os.path.join(workdirectory, 'configure') if not ...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lice...
# -*- coding: utf-8 -*- """ pyte.streams ~~~~~~~~~~~~ This module provides three stream implementations with different features; for starters, here's a quick example of how streams are typically used: >>> import pyte >>> >>> class Dummy(object): ... def __init__(self): ... self.y = 0 ... ... def cursor_up...
<filename>arraytool/documentation/examples/examples.py #! /usr/bin/env python # Author: <NAME> (srinivas . zinka [at] gmail . com) # Copyright (c) 2011 <NAME> # License: New BSD License. def at_import_ex(): """ :func:`at_import() <planar.at_import>` is a simple function to import CSV text files as Numpy ndarrays....
# -*- coding: utf-8 -*- import os import dash_core_components as dcc import dash_html_components as html from dash_docs.tutorial.components import Example, Syntax from dash_docs import tools from dash_docs import reusable_components def get_example_name(path): """Returns the name of an example given its path.""" #...
<gh_stars>0 from flask import render_template, request, redirect, url_for, abort, flash, session, g, send_from_directory from flask.globals import session as session_obj from flask_login import login_user, login_required, logout_user, current_user from sqlalchemy.orm import exc from sqlalchemy import and_ import json, ...
2, "course_project": False }, { "id": 35889, "name": "Рамановское и Мандельштам-бриллюэновское рассеяния в оптических волокнах и их применение", "term": 2, "course_project": False }, { "id": 30153, "name": "Распознавание и генерация речи", "term": 4, "course_project": False }, { "id": 26385, "name": "Р...
<filename>python/example_code/lambda/lambda_with_api_gateway.py # snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] # snippet-sourcedescription:[lambda_with_api_gateway.py demonstrates how to create an AWS Lambda function and an API Gateway REST API interface.] # snippet-service:[la...
# This file is part of COFFEE # # COFFEE is Copyright (c) 2014, Imperial College London. # Please see the AUTHORS file in the main source directory for # a full list of copyright holders. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...
arg1 provided. Assuming the caller needs assistance....\n--') UserErr(str(name) + ' tried to move, but didn\'t provide an arg1. I\'ll assume the caller needs help.\n') try: embedVal = generateEmbed(title=":grey_question: **Help: `" + str(pre) + " " + str(clr) + "`**",desc="(You're seeing this message because no argu...
"""Tests for concat_op_handler.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import mock from morph_net.framework import concat_op_handler from morph_net.framework import op_regularizer_manager as orm import tensorflow.compat.v1 as tf from tensorflow....
# Copyright (c) 2021, NVIDIA CORPORATION. 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...
<reponame>ddesvillechabrol/sequana # -*- coding: utf-8 -*- # # This file is part of Sequana software # # Copyright (c) 2016-2020 - Sequana Development Team # # File author(s): # <NAME> <<EMAIL>> # # Distributed under the terms of the 3-clause BSD license. # The full license is in the LICENSE file, distributed with this...
<gh_stars>1000+ # Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
the daily maintenance window for a cluster.""" # Special behavior for removing the window. This actually removes the # recurring window too, if set (since anyone using this command if there's # actually a recurring window probably intends that!). if maintenance_window == 'None': daily_window = None else: daily_w...
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This module uprevs Chrome for cbuildbot. After calling, it prints outs CHROME_VERSION_ATOM=(version atom string). A caller could then use this ato...
== "entbasek9": subdirectory = "ENTERPRISE-BASE" elif imagecode == "entbase": subdirectory = "ENTERPRISE-BASE-NO-CRYPTO" elif imagecode == "j1s3": subdirectory = "ENTERPRISE-BASIC" elif imagecode == "k2": subdirectory = "ENTERPRISE-CIP2" elif imagecode == "k2o3sv3y": subdirectory = "IP-FW-VOICE-PLUS-IPSEC...
: return _define_any_model(data, model_params, global_params, random_seed) def optimize_imp_ama_model( data: pd.DataFrame, model_params: Dict[str, Any], global_params: Dict[str, Any], active_run_id: str, random_seed: str, hyper_params: Dict[str,str], filt_pipeline: FilterPipeline, ) : train_selection = Tru...
<filename>py/shared/emails/plumbing.py<gh_stars>10-100 import asyncio import base64 import datetime import hashlib import hmac import json import logging import re from binascii import hexlify from email.message import EmailMessage from email.policy import SMTP from functools import reduce from pathlib import Path from...
allnet=False, modified_after=None, qc_constraints=None): constraints = {} if qc_constraints is not None: constraints = qc_constraints if sensortype is not None: constraints['sensortype'] = sensortype if permanent is not None: if permanent: constraints['permanent'] = 'true' else: constraints['permanent'] ...
<gh_stars>1-10 import numpy as np import torch import random import pandas as pd import os import cv2 import argparse import math import matplotlib.pyplot as plt import pathlib def load_sdd_raw(path): data_path = os.path.join(path, "annotations") scenes_main = os.listdir(data_path) SDD_cols = ['trackId', 'xmin', 'y...
<reponame>theGreenJedi/neon from builtins import str from pycuda.tools import context_dependent_memoize from neon.backends import cuda_templates from neon.backends.cuda_templates import (_common_fp16_to_fp32, _common_round, # for fp32_to_fp16 converter _common_max_abs, _common_kepler, _ew_types) from neon.backends...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is auto generated by the resource # mod...
== 11: if ftype == TType.STRING: self.cld_in = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.cli_in = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: ipro...
some commonly useful distributions, `co2Qgates` can be a list of lists of lists of compatible 2-qubit gates ("nested" sampling). In this case, a list of lists of compatible 2-qubit gates is picked according to the distribution `co2Qgatesprob`, and then one of the sublists of compatible 2-qubit gates in the selected ...
<filename>neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py # Copyright 2019 Red Hat, 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....
<filename>optical_rl_gym/envs/rmcsa_env.py import gym import copy import math import heapq import logging import functools import numpy as np from collections import defaultdict from optical_rl_gym.utils import Service, Path from .optical_network_env import OpticalNetworkEnv class RMCSAEnv(OpticalNetworkEnv): met...
values are environment variable values for those names. serving_container_ports: Optional[Sequence[int]]=None, Declaration of ports that are exposed by the container. This field is primarily informational, it gives Vertex AI information about the network connections the container uses. Listing or not a port here ha...
<reponame>pulumi/pulumi-kubernetes-crds<gh_stars>0 # coding=utf-8 # *** WARNING: this file was generated by crd2pulumi. *** # *** 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 fro...
import pandas as pd from pandas import DatetimeIndex from pandas.plotting import table import datetime from datetime import datetime, timedelta import numpy as np import matplotlib.pyplot as pltimport import seaborn as sb sb.set() import os import sys import warnings if not sys.warnoptions: warnings.simp...
'int'}, 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, 'decimal_point_indic...
if in_samples and out_samples: y10 = [each[0] for each in out_samples] y20 = [each[0] for each in in_samples] miny = min(min(y10), min(y20)) maxy = max(max(y10), max(y20)) y0 = [m for m in range(miny, maxy + 1)] miss1 = list(set(y10) ^ set(y0)) miss2 = list(set(y20) ^ set(y0)) for each in miss1: out_samples....
"""Probes are pipeline operators to instrument state that passes through the pipeline such as populations or individuals. """ import csv import sys from typing import Dict, Iterator from matplotlib import pyplot as plt import numpy as np import pandas as pd from toolz import curry from leap_ec.global_vars import con...
""" label_list = set() for entry in entrylist: object_type = entry['object']['type'] object_value = entry['object']['value'] if not object_value: break if object_type == 'label': label_list.add(object_value) rdfobject = {} rdfobject['type'] = object_type rdfobject['value'] = object_value pred_type = entry['...
kwargs=network_params \ ); elif(network_class_name == 'MultiplexAutoencoderFixedStainsArch3Next3Adverserial'): from ..sa_networks.multiplex_autoencoder_fixed_stains_arch3_next3_adverserial import MultiplexAutoencoderFixedStainsArch3Next3Adverserial; cnn_arch = MultiplexAutoencoderFixedStainsArch3Next3Adverserial(n_...
normalized best-fit # values, or 1 if any of them deviates more than limdev mask_deviant = (np.abs(factor_temp_norm - 1) > limdev) if np.any(mask_deviant): log.warning ('factor deviation for channel(s) {} larger than {}: ' '{}; setting all channel factors to 1' .format(list(np.nonzero(mask_deviant)[0]+1), limdev,...
dataset as argument. Therefore, in this case setting the dataset property within the exporter object is not necessary. The actual export is implemented within the non-public method :meth:`_export` that gets automatically called. Parameters ---------- dataset : :class:`aspecd.dataset.Dataset` Dataset to export ...
# # To run tests, you can do 'python -m testtools.run tests'. To run specific tests, # You can do 'python -m testtools.run -l tests' # Set the env variable PARAMS_FILE to point to your ini file. Else it will try to pick params.ini in PWD # import os import copy import traceback from novaclient import client as mynovacl...
<filename>bazel/repositories.bzl load(":dev_binding.bzl", "envoy_dev_binding") load(":genrule_repository.bzl", "genrule_repository") load("@envoy_api//bazel:envoy_http_archive.bzl", "envoy_http_archive") load("@envoy_api//bazel:external_deps.bzl", "load_repository_locations") load(":repository_locations.bzl", "REPOSITO...
% uid else: tag_info = '' tag_call = '(no tags)' items.append({ 'uid': uid, 'since_when': since_when, 'creator': creator, 'loaded': loaded, 'feed_uid': feed_uid, 'title': title, 'feed_html': feed_html, 'content': content, 'tag_info': tag_info, 'tag_call': tag_call, 'redirect': redirect, 'feed_title': fe...
<gh_stars>0 import os import numpy as np import skimage from PIL import Image import matplotlib.pyplot as plt import time import zipfile import urllib.request import shutil import json import shutil from IPython.display import clear_output import datetime from enum import Enum # COCO tools from pycocot...
E501 # verify the required parameter 'uuid' is set if self.api_client.client_side_validation and ('uuid' not in local_var_params or # noqa: E501 local_var_params['uuid'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `uuid` when calling `get_run_clones_lineage`") # noqa: E501 collectio...
<gh_stars>1-10 import argparse import csv import itertools import os import re import sys import time from collections import defaultdict from io import StringIO, BytesIO from logging import FileHandler from urllib import parse as urlparse from cached_property import cached_property from egcg_core import rest_communic...
with pytest.raises(InvalidTimeDeclarationError): chef_parser.parse_refrigerate('for 1 hours.') with pytest.raises(InvalidTimeDeclarationError): chef_parser.parse_refrigerate('for 2 hour.') class TestParseLoopStart(object): def test_valid(self): d = chef_parser.parse_loop_start('Eat', 'the burger.') assert d == ...
<filename>unittest/scripts/auto/py_adminapi/validation/dba_cluster_help.py<gh_stars>0 #@ __global__ || #@<OUT> cluster NAME Cluster - Represents an InnoDB cluster. DESCRIPTION The cluster object is the entry point to manage and monitor a MySQL InnoDB cluster. A cluster is a set of MySQLd Instances which holds th...
<reponame>xochilt/cousebuilder # Copyright 2014 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 requ...
+ m.b224 + m.b225 + m.b226 + m.b227 + m.b228 + m.b229 + m.b230 + m.b231 + m.b232 + m.b233 + m.b234 == 1) m.c19 = Constraint(expr= m.b235 + m.b236 + m.b237 + m.b238 + m.b239 + m.b240 + m.b241 + m.b242 + m.b243 + m.b244 + m.b245 + m.b246 == 1) m.c20 = Constraint(expr= m.b247 + m.b248 + m.b249 + m.b250 + m.b251 + m.b2...
# -*- coding: utf-8 -*- from __future__ import annotations import llvmlite.ir as ir import numpy as np from ctypes import c_float, POINTER, pointer, byref, addressof, c_double, c_int32 from .utils import LRValue, uuname, BinaryOpr, UnaryOpr, biopr_map, LoopCtx, unopr_map from . import global_records as gr from .typing...
X to train each base estimator. - If None (default), then draw `X.shape[0]` samples. - If int, then draw `max_samples` samples. - If float, then draw `max_samples * X.shape[0]` samples. Thus, `max_samples` should be in the interval `(0.0, 1.0]`. Attributes ---------- base_estimator_ : DecisionTreeRegressor T...
`layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can a...
<reponame>OttoJursch/DRL_robot_exploration<gh_stars>0 from copy import deepcopy from scipy import spatial from skimage import io from skimage.transform import resize from scipy import ndimage from random import shuffle import numpy as np import numpy.ma as ma import time import copy import sys import os import random i...
""" Levenberg Marquart fitting class and helper tools https://github.com/jaimedelacruz/LevMar Coded by <NAME> (ISP-SU 2021) References: This implementation follows the notation presented in: <NAME>, Leenaarts, Danilovic & Uitenbroek (2019): https://ui.adsabs.harvard.edu/abs/2019A%26A...623A..74D/abstract but without...
`{}`\nMember will be muted for: `{}`\nCustom Text for Unmute button: `{}`".format(getcur, cur_value, cust_text) update.effective_message.reply_text(text, parse_mode="markdown") @run_async @user_admin def security_mute(bot: Bot, update: Update, args: List[str]) -> str: chat = update.effective_chat # type: Optional[C...
= 'an' if txt[0] in ['a', 'e', 'i', 'o', 'u'] else 'a' return txt return pre # -- Messaging commands -- # def send_action(self, agent_id, action): """ Parse the action and send it to the agent with send_msg. """ if action['caller'] is None: val = self.extract_classed_from_dict(action['txt'], agent_id, '') i...
3.2, 2.8, 2.5, 2.8, 2.9, 3, 2.8, 3, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3, 3.4, 3.1, 2.3, 3, 2.5, 2.6, 3, 2.6, 2.3, 2.7, 3, 2.9, 2.9, 2.5, 2.8], "y": [4.7, 4.5, 4.9, 4, 4.6, 4.5, 4.7, 3.3, 4.6, 3.9, 3.5, 4.2, 4, 4.7, 3.6, 4.4, 4.5, 4.1, 4.5, 3.9, 4.8, 4, 4.9, 4.7, 4.3, 4.4, 4.8, 5, 4.5, 3.5, 3.8, 3.7, 3.9, 5.1, 4.5, 4.5, 4....
<reponame>RoyaFiroozi/barc<filename>barc_ros_packages/barc_general/src/state_estimation_bm/main.py #!/usr/bin/env python # --------------------------------------------------------------------------- # Licensing Information: You are free to use or extend these projects for # education or reserach purposes provided that...
"""module for checking if source needs to be updated in Knowledge Network (KN). Contains the class SrcClass which serves as the base class for each supported source in the KN. Contains module functions:: get_SrcClass(args) compare_versions(SrcClass) check(module, args=None) main_parse_args() Examples: To run c...
<gh_stars>0 # File created for Yale research # by <NAME>, <NAME> # This python3 code has two functions # 1) communicating with the credential issuer UI # 2) acting as the msp server import argparse import asyncio import json import random import logging import base64 import os import sys from uuid import uuid4 sys.pa...
<reponame>wlongxiang/KRR-course ### ### Propagation function to be used in the recursive sudoku solver ### import time from itertools import chain import clingo from pysat.formula import CNF from pysat.solvers import MinisatGH def deep_copy(sudoku_possible_values): copy = [] for row in sudoku_possible_values: row...
there is a new version being worked on" return bool(self.activeprojects.filter()) def get_published_versions(self): """ Return a queryset of PublishedProjects, sorted by version. """ return self.publishedprojects.filter().order_by('version_order') @property def total_published_size(self): """ Total storage ...
Changing configuration.") self.change_config('FAIL') self.agentMgr.status_set("HealthStatus:", "FAIL") self.CURRENTSTATUS = 0 else: # We get here if we had some weird exception syslog.syslog("TCPCheck - An exception occurred. Skipping to next interval") # Wait for CHECKINTERVAL if self.agentMgr.agent_option("...
'tellurium-116', 52, 116, 115.908460, False), 'Te-117': Iso('Te-117', 'tellurium-117', 52, 117, 116.908646, False), 'Te-118': Iso('Te-118', 'tellurium-118', 52, 118, 117.905854, False), 'Te-119': Iso('Te-119', 'tellurium-119', 52, 119, 118.9064071, False), 'Te-120': Iso('Te-120', 'tellurium-120', 52, 120, 119.90405...
1] # risingdeltas[-1][0] >= len(self.bcdeltas) return risingdeltas def inflectionPoints(self) -> Tuple[List[int], List[float]]: """ adjusted approximation of the inflection points at rising edges of the smoothed bcd. The approximation is that we are using the maximum delta of the unsmoothed bcd in scope of the ...
)) ", "verbal_confirmation": '', "planner_confirmed": '', "planner_not_confirmed": ''}, #$task = open the (entrance | exit | corridor) door #$task = close the (entrance | exit | corridor) door {"params": ["Action", "Pos", "Door"], "Action": [["open", "close"], [], [], []], "Pos":[["entrance", "exit", "corridor...
key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501...
invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.portals_id_members_rel_fk_delete(id, fk, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: Portal id (required) :para...
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Element: 81 Faces: -1 -...
import matplotlib.pyplot as plt import numpy as np import os,glob,sys,importlib,pickle#,scipy,coolbox,pybedtools, # from tqdm import tqdm from scipy.stats import rankdata import pandas as pd import networkx as nx import seaborn as sns from joblib import delayed, wrap_non_picklable_objects from pathlib import Path impor...
<reponame>janssenhenning/pymatgen # coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License """ Module for reading Lobster output files. For more information on LOBSTER see www.cohp.de. """ import collections import fnmatch import os import re import warnings from col...
<reponame>gvashchenkolineate/gvashchenkolineate_infra_trytravis<filename>ansible/venv/lib/python2.7/site-packages/ansible/module_utils/network/ftd/configuration.py # Copyright (c) 2018 Cisco and/or its affiliates. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it ...
#!/usr/bin/python3 #import threading from time import sleep #import urllib.request import subprocess import re import sys import os import cgi import datetime #from pushover import Client #client = Client("ucGDF9dXuEPgUmNFWoGvGxKj9KVEgx", api_token="<KEY>") # NEED BETTER LOGGING topPoints = {} magdic = {} def log(l...
<reponame>AdnanKhan27/nicstestbed """ MIT License Copyright (c) 2016 <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, co...
to which connections will be grown) :param num_potential: list of counts of potential synapses for every segment :return: """ for segment in learning_segments: connections.adaptSegment(segment, active_cells, permanence_increment, permanence_decrement, self.prune_zero_synapses, segmentThreshold) if sample_size =...
<reponame>asch99/QDarkStyleSheet # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'dw_buttons.ui', # licensing of 'dw_buttons.ui' applies. # # Created: Fri May 31 23:17:03 2019 # by: pyside2-uic running on PySide2 5.12.3 # # WARNING! All changes made in this file will be lost! from PySide2...
"trust_with_sets": [set(), set(), set()] }, { "stored_with": [{1}, {2}], "plaintext_sets": [set()], "trust_with_sets": [set()] }, { "stored_with": [{1}, {2}], "plaintext_sets": [{1, 2}], "trust_with_sets": [{1, 2}] } ] } ), ( [ { "col_names": ["a", "b"], "stored_with": {1}, "plaintext_sets": [{1}, {...