input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>mjpekala/ae-stability-study<filename>src/subspace_attack.py """ REFERENCES: [tra17] Tramer et al. "The Space of Transferable Adversarial Examples," 2017. [tbd17a] "Decision Boundary Analysis of Adversarial Examples," blind ICRL submission 2017. [tbd17b] "Visualizing the Loss Landscape of Neural Nets," b...
(308629504*mckin**5*(1 + 20*np.log(2) + 20*np.log(1 - mckin/mbkin)))/ (9477*mbkin**5) - (771573760*mckin**6*(1 + 20*np.log(2) + 20*np.log(1 - mckin/mbkin)))/(9477*mbkin**6) + (1543147520*mckin**7*(1 + 20*np.log(2) + 20*np.log(1 - mckin/mbkin)))/ (9477*mbkin**7) - (192893440*mckin**8*(1 + 20*np.log(2) + 20*np.log(1...
导入训练数据 每段时间满足某组hashtag规则 不能是转发文本 """ def get_train_tweets(self, all_id): set_tweets = set() #* 需要修改!! # target_dir = ["201908"] if self.now == "201904": target_dir = ["201902", "201903"] else: target_dir = [pendulum.parse(self.now + "01").add(days=-1).format("YYYYMM")] print("Targets:", target_dir) fr...
"""Klamp't visualization routines. See Python/demos/vistemplate.py for an example of how to run this module. The visualization module lets you draw most Klamp't objects in a 3D world using a simple interface. It also lets you customize the GUI using Qt widgets, OpenGL drawing, and keyboard/mouse intercept routines. ...
AllocateEnv(): if pooling: ret = ODBC_API.SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, SQL_CP_ONE_PER_HENV, SQL_IS_UINTEGER) validate(ret, SQL_HANDLE_ENV, SQL_NULL_HANDLE) ''' Allocate an ODBC environment by initializing the handle shared_env_h ODBC enviroment needed to be created, so connections ...
'zh': u('\u798f\u5efa\u7701\u798f\u5dde\u5e02')}, '861845238':{'en': '<NAME>', 'zh': u('\u6c5f\u82cf\u7701\u5357\u4eac\u5e02')}, '861845239':{'en': '<NAME>', 'zh': u('\u6c5f\u82cf\u7701\u9547\u6c5f\u5e02')}, '861845236':{'en': '<NAME>', 'zh': u('\u6c5f\u82cf\u7701\u5357\u4eac\u5e02')}, '861845237':{'en': '<NAME>', ...
type is a guess. nfaci_village_town_voc_training = models.TextField(blank=True, null=True) # This field type is a guess. ina_distcode_voc_training = models.TextField(blank=True, null=True) # This field type is a guess. gov_nonformal_training_status = models.TextField(blank=True, null=True) # This field type is a gue...
#4148: analyzer.metrics_manager.resolutions # Bug #4146: check_data_sparsity - incorrect on low fidelity and inconsistent metrics # Also determine resolution of metrics that were not checked for data # sparsity unique_metrics_set = set(list(unique_metrics)) check_metrics_set = set(check_metrics) set_difference = ...
import numpy as np from numpy.random import choice import math import random import torch from torch import nn as nn from rlkit.policies.base import ExplorationPolicy, Policy from rlkit.torch.common.networks import Mlp, FlattenMlp from rlkit.torch.common.distributions import ReparamTanhMultivariateNormal from rlkit.t...
non-zero. nans : bool Defaults to True. Values cannot be nan. rows : bool Defaults to True. Reduce rows also if entire row filtered. keep : bool Defaults to False. When set to True, does the opposite. ret_filters : bool If True, return row and column filters based on the comparisons Returns ------...
<reponame>FINNGEN/pheweb<filename>pheweb/file_utils.py from typing import List, Union from pathlib import Path import io import os import csv from contextlib import contextmanager import json import gzip import datetime from boltons.fileutils import AtomicSaver, mkdir_p import pysam from .utils import PheWebError, ge...
import numpy as np from scipy.stats import poisson #lr1,lr2 = [int(x) for x in input().strip().split()] #lrr1,lrr2 = [int(x) for x in input().strip().split()] #reward = [10,-2] gamma = 0.9 V = np.zeros([20+1,20+1]) pie = np.zeros([20+1,20+1]) class samples: def __init__(self,l1,l2,ep = 0.01): self.ep = ...
import pymysql import os import numpy as np import pandas as pd from pandas.api.types import is_string_dtype from pulp import * import math import time import warnings #import cplex localaddress="C:\\Users\\1026819\\Documents\\SCA_Project3" def grpbatchInitialmap(grpname, batchInitchar): glo...
<filename>mlprodict/grammar/gactions.py<gh_stars>1-10 """ @file @brief Action definition. """ import numpy from .api_extension import AutoAction from .gtypes import MLType, MLNumTypeFloat32, MLTensor, MLNumTypeInt32, MLNumTypeBool class MLAction(AutoAction): """ Base class for every action. """ def __init__(self...
(!yt) return;\n" cppline += " " + s.arg.replace('-','_') + "_ = std::make_shared<" + get_struct_name(s.arg) + ">();\n" fdcpp.write(cppline + "\n") if level == 0: if judge_if_optional_state(s) == 1: cppline = " read_grp_" + judge_if_uses(s).replace('-','_') + "(yt, *" + s.arg.replace('-','_') + "_);\n" else: cppl...
# Copyright 2022 AI Singapore # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
UserModel If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.revoke_permission_from_users_with_http_info(permission, **kwargs) # noqa: E501 else: (data) = self.revoke_permission_from_users_with_http_info(permiss...
import mmutils import qrcode class Display(object): #COLORS COLORS = { "DEFAULT":"\033[00;33;40m", "WHITE":"\033[00;37;40m", "WHITE_BOLD":"\033[01;37;40m", "RED":"\033[01;31;40m", "BLUE":"\033[01;36;40m", "GREEN":"\033[01;32;40m", "M":"\033[0;4;33;40mM\033[00;37;40m", "MM":"\033[0;4;33;40mM\033[00;37;40moner...
assert u < 0, u _test_reduction_complemented_edges(expr, bdd) def _test_reduction_complemented_edges(expr, bdd): u = bdd.add_expr(expr) bdd.roots.add(u) bdd_r = bdd.reduction() v, = bdd_r.roots v_ = bdd_r.add_expr(expr) assert v == v_, (v, v_) bdd_r.assert_consistent() bdd.roots.remove(u) def test_find_or_...
<reponame>qingyundou/tacotron_qdou import argparse from datetime import datetime import math import numpy as np import os import subprocess import time import tensorflow as tf import traceback from tacotron.alignment_synthesizer import AlignmentSynthesizer from hparams import hparams, hparams_debug_string from tacotr...
import MnetIE from .moevideo import MoeVideoIE from .mofosex import ( MofosexIE, MofosexEmbedIE, ) from .mojvideo import MojvideoIE from .morningstar import MorningstarIE from .motherless import ( MotherlessIE, MotherlessGroupIE ) from .motorsport import MotorsportIE from .movieclips import MovieClipsIE from .movie...
for x in _DONT_STORE_TASK_PARAMS ] buildtype = rootbconf.selectedBuildType tasksData = { 'tasks' : tasks, 'taskenvs' : envs, 'buildtype' : buildtype, 'depconfs' : self.zmdepconfs, 'ordered-tasknames' : [x['name'] for x in self.allOrderedTasks], } cachePath = assist.makeTasksCachePath(cachedir, buildtype) d...
"""Implementation of the OpenProbFOIL algorithm. """ from __future__ import print_function from ad import gh from ad.admath import * import argparse from copy import copy from data import DataFile from getExpression import ( getExpression, ) # Get SQL Query that outputs a probabilistic expression for UCQ from learn i...
return self.nodes[:].data @property def edges(self): """Return a edges view that can used to set/get feature data.""" return EdgeView(self) @property def edata(self): """Return the data view of all the edges.""" return self.edges[:].data def set_n_repr(self, hu, u=ALL, inplace=False): """Set node(s) repres...
\"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, \n") writeFile.write("publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, \n") writeFile.write("subject ...
<gh_stars>10-100 """Setup for Psc2 demo with Arturia keyboard. This is a server that communicates with SuperCollider for interacting with a MIDI controller. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import app import sys import collectio...
# -*- coding:utf-8 -*- from __future__ import unicode_literals from future.builtins import map from future.builtins import str from future.builtins import object from future.utils import with_metaclass import re from copy import copy from limpyd import model, fields from limpyd.exceptions import * from limpyd.contrib...
if op != 'AND': logger.debug('Skipping aggregate with operator %s.' % op) return None member_ids = [m.attrib.get('id') for m in members] member_agents = [] for member_id in member_ids: agent = self._get_agent_by_id(member_id, event_id) if agent is None: logger.warning('Could not extract term %s.' % member_id) ...
convert_matrices,\ mock.patch('kb_python.count.filter_with_bustools') as filter_with_bustools,\ mock.patch('kb_python.count.STATS') as STATS,\ mock.patch('kb_python.count.render_report'),\ mock.patch('kb_python.count.import_matrix_as_anndata'): out_dir = self.temp_dir temp_dir = self.temp_dir counts_dir = os.pat...
<filename>babyai/levels/levelgen.py import random from collections import OrderedDict from copy import deepcopy import gym from gym_minigrid.roomgrid import RoomGrid from .verifier import * class RejectSampling(Exception): """ Exception used for rejection sampling """ pass class RoomGridLevel(RoomGrid): """ ...
(len(volparam) > 0): volmap['id'] = self.volume_query(volparam[0]) if (len(volparam) > 1): volmap['lun'] = volparam[1] volentry.append(volmap) volChanges['add'] = volentry if (remVolList): vols = remVolList.split(',') volEntry = [] for volLbl in vols: volEntry.append(self.volume_query(volLbl)) volChanges['re...
<gh_stars>0 #!/usr/bin/python # Copyright 2013 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 requi...
<filename>IPython/Extensions/ibrowse.py # -*- coding: iso-8859-1 -*- import curses, fcntl, signal, struct, tty, textwrap, inspect from IPython import ipapi import astyle, ipipe # Python 2.3 compatibility try: set except NameError: import sets set = sets.Set # Python 2.3 compatibility try: sorted except NameEr...
from functools import update_wrapper from collections import deque from pytz import timezone from datetime import datetime import asyncio import re import xml.etree.ElementTree as et import json import logging import itertools from .exceptions import ParseError, ContentError, ConnectTimeout, DscraperError _logger = l...
password="<PASSWORD>") TimedTextTrackFactory() response = self.client.get("/api/timedtexttracks/") self.assertEqual(response.status_code, 401) def test_api_timed_text_track_create_anonymous(self): """Anonymous users should not be able to create a new timed text track.""" response = self.client.post("/api/timedte...
*sh, struct SFXHDR *sfh)") del_items(0x80090710) SetType(0x80090710, "int AS_OpenStream__FP6STRHDRP6SFXHDR(struct STRHDR *sh, struct SFXHDR *sfh)") del_items(0x800907B0) SetType(0x800907B0, "char AS_GetBlock__FP6SFXHDR(struct SFXHDR *sfh)") del_items(0x800907BC) SetType(0x800907BC, "void AS_CloseStream__FP6STRHDRP6SFXH...
<reponame>nealedj/eq-survey-runner<filename>tests/app/validation/test_number_range_validator.py import unittest from unittest.mock import Mock, patch from wtforms.validators import ValidationError from app.jinja_filters import format_number from app.validation.error_messages import error_messages from app.validation.v...
be traced :param int tracing_threshold_queue_size: Limits the number of requests traced. :param timedelta tracing_threshold_queue_flush_interval: Interval between flushes of the threshold queues. :param int tracing_orphaned_queue_size: Limits the number of orphaned requests traced. :param timedelta tracing_orphaned...
precomputed bucket width; the value of which is returned as `bucketWidth` in the response. Defaults to infinity (each bucket spans an entire reference sequence) or the length of the target range, if specified. The smallest precomputed `bucketWidth` is currently 2048 base pairs; this is subject to change. """ end...
iterates over all the validation tuples to execute/run the # complete set of validation methods for the attribute for validation_tuple in validation_tuple_list: # retrieves the validation method the validate null and properties # from the validation tuple to be used for the validation validation_method, valid...
"match") + " " + match_info.match_id.get() + ":** " tmp_reply_string += ( escape_markdown(match_info.team1.get()) + " vs " + escape_markdown(match_info.team2.get()) + "\n" ) tmp_reply_string += self.get_pretty_date(ctx, tournament, match_date) + "\n\n" referees = list(filter(None, [cell.get() for cell in match_inf...
boolean. - value : val (float) [] - velocity : v (float, float, float) [create,query,edit] Specifies the values of the x, y, and z components of the velocity to use when painting the property velocity. Flag can have multiple arguments, passed either as a tuple or a list. - whichTool : wst (unicode) [] - w...
# Copyright (c) 2014 Cisco Systems 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...
# -*- coding: utf-8 -*- # Copyright 2018 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. """Database interface for all calls from Chromite. BuildStore will be the interface which communicates between CIDB, Buildbucket ...
# -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- import pdb from functools import partial import numpy as np import torch...
f'/gateway.do', TeaCore.to_map(request), headers, runtime) ) async def add_meta_masterzonerel_ex_async( self, request: deps_models.AddMetaMasterzonerelRequest, headers: Dict[str, str], runtime: util_models.RuntimeOptions, ) -> deps_models.AddMetaMasterzonerelResponse: """ Description: 关联 master zone Summary:...
<filename>Statstool-Desktop/parserfunctions.py from re import DOTALL, split, compile, findall import numpy as np import matplotlib.pyplot as plt def colormap(values, mode=0, output_range=1): """ Green - Red Colormap with min, max & mean Takes list of values, 0,1,2 to specify mode and the output_range (1, 255 mainl...
app.setConfigDefault("log_file", self.getStdoutName(namingScheme), "Result file to search, by default") app.setConfigDefault("failure_severity", self.defaultSeverities(), \ "Mapping of result files to how serious diffs in them are") app.setConfigDefault("failure_display_priority", self.defaultDisplayPriorities(), \ ...
= self.imparams.fps duration_frames = np.ceil((duration_ms / 1000) * frame_rate) return int(duration_frames) + 1 @property def prestim_test_slice(self): """slice representing prestim response frames""" return np.s_[self.prestim_frames - self.prestim_response_frames_window: self.prestim_frames] @property def p...
is not in check and yet is_in_check returns True for Blue") g.make_move('h8','c8') #blue moves -- check here g.make_move('d3','e5') #red g.make_move('c8','c4') #blue cannon captures red soldier -- check here try: self.assertEqual(g.get_game_state().upper(), 'UNFINISHED') except: self.fail("Game state should be...
self.file_id = map.get('file_id') return self class GetShareLinkByAnonymousRequest(TeaModel): """ get_share_link_by_anonymous request """ def __init__(self, share_id=None): # share_id self.share_id = share_id # type: str def validate(self): pass def to_map(self): result = {} if self.share_id is not None...
<filename>hrv/rri.py """ Objects for dealing with RR intervals series (RRi). This module offers two classes to represent RRi series as Python objects which brings widely used methods to extract information from tachograms. Once RRi or RRiDetrended are instanciated is it possible to calculate simple descriptive statist...
<reponame>RedHolms/vk_bots<filename>vk_bots/__main__.py import sys import traceback import requests from ._vkapi import VkAPI from .longpoll import LongPollManager from . import utils, types, enums class StopBot(Exception): pass vk_bots = types.Empty() class VKBots(object): """Main VKBots class""" def __new__(cl...
<reponame>belkhir-nacim/Fast-AutoAugment-Segmentation<filename>FastAutoAugment/joint_transform.py<gh_stars>0 """ # Code borrowded from: # https://github.com/zijundeng/pytorch-semantic-segmentation/blob/master/utils/joint_transforms.py # # # MIT License # # Copyright (c) 2017 ZijunDeng # # Permission is hereby granted, ...
<gh_stars>0 import re import os, glob import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo as model_zoo from collections import OrderedDict from tensorboardX import SummaryWriter import torchvision.utils as vutils import pdb __all__ = ['DenseNet', 'densenet121', 'densenet16...
'Profile max' imi = np.nanargmin(prof) tab.meta['prof_ymi'] = yarr[imi], 'Location of profile min' tab.meta['prof_mi'] = prof[imi], 'Profile min' for k in ['prof_offset','file','filter','targname']: tab.meta[k] = spec[k] stats = {} cols = ['SKYPA3','AIRMASS','GUIDFWHM'] tr = {'SKYPA3':'pa','AIRMASS':'airm',...
<reponame>Justyer/Secret #单例测试导入路径 if __name__ == '__main__': import sys, os parent_path = os.path.dirname(os.getcwd()) sys.path.append(parent_path) from webparser.webparserbase import ParserBase from serializ.htmlfile import * from serializ.oracle import * from bean.urlbean import * from log.logger impor...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright &copy; 2014-2016 NetApp, Inc. All Rights Reserved. # # DO NOT EDIT THIS CODE BY HAND! It has been generated with jsvcgen. # import click from element.cli import utils as cli_utils from element.cli import parser from element.cli.cli import pass_context from eleme...
"""Pythonic API for LDAP operations.""" import functools import six from twisted.internet import defer from twisted.python.failure import Failure from zope.interface import implementer from ldaptor.protocols.ldap import ldapclient, ldif, distinguishedname, ldaperrors from ldaptor.protocols import pureldap, pureber fr...
computed directly." " Check your PipelineEngine configuration." ) class InputDates(Term): """ 1-Dimensional term providing date labels for other term inputs. This term is guaranteed to be available as an input for any term computed by SimplePipelineEngine.run_pipeline(). """ ndim = 1 dataset = None dtype =...
<gh_stars>0 # Core Library modules from typing import Any, Dict, Tuple # Third party modules import numpy as np # Local modules from .sir import SIR, SIRD def calc_hosp_numbers(i: np.ndarray, rate: float) -> np.ndarray: """ calc_hosp_numbers: given an infection curve i, and a rate, how many people will use reso...
<reponame>SPOpenSource/edgeconnect-python # MIT License # (C) Copyright 2021 Hewlett Packard Enterprise Development LP. # # flow : ECOS current flows def get_appliance_flows( # noqa: C901, silences flake8 complexity self, ne_id: str, ip1: str = None, mask1: str = None, port1: int = None, ip2: str = None, mask2...
'required': ['name', 'description'], 'type': 'object'}, 'Tools': {'additionalProperties': False, 'properties': {'sha256': {'type': 'string'}, 'size': {'type': 'integer'}, 'url': {'type': 'string'}, 'version': {'$ref': '#/definitions/Binary'}}, 'required': ['version', 'url', 'size'], 'type': 'object'}, 'UnitSta...
a results map # from the log output. results_map = gtest_slave_utils.GetResultsMap(log_processor) except Exception as e: # This error will be caught by the following 'not results_map' statement. print 'Error: ', e if not results_map: print 'No data was available to update the JSON results' # Consider this non-...
hidden_t_new = gate_output * numpy.tanh(cell_t_new) self.hidden_t = numpy.copy(hidden_t_new) self.cell_t = numpy.copy(cell_t_new) # # # def compute_intensity_given_past(self, time_current): # compute the intensity of current time # given the past events # time_recent = self.one_seq[-1]['time_since_start'] # ...
gaussian noise. Later it is supposed to add more functionality (see Issue #8). :param average_freq: (optional) Use IF-averaged data for calculating errors? (default: ``False``) :param use_V: (optional) Boolean. Calculate noise using Stokes `V` or successive differences? (default: ``True``) :return: Numpy.ndar...
Starting epoch %i ... ============" % trainer.epoch) if not params.meta_learning : trainer.n_sentences = 0 while trainer.n_sentences < trainer.epoch_size : # CLM steps for lang1, lang2 in shuf_order(params.clm_steps, params): trainer.clm_step(lang1, lang2, params.lambda_clm) # MLM steps (also includes TLM if ...
<filename>blender-2.49/iqm_export.py #!BPY """ Name: 'Inter-Quake Model' Blender: 249 Group: 'Export' Tip: 'Export Inter-Quake Model files' """ import struct, math import Blender import BPyArmature IQM_POSITION = 0 IQM_TEXCOORD = 1 IQM_NORMAL = 2 IQM_TANGENT = 3 IQM_BLENDINDEXES = 4 IQM_BLENDWEIGHTS ...
comparison must refer to all Item subclasses in that tuple, and specify the relationships between them. @param limit: an int to limit the total length of the results, or None for all available results. @param offset: an int to specify a starting point within the available results, or None to start at 0. @param...
is not None else 0 vertical_sections = sum([ always_sections, positions_sections, transactions_sections, live_sections, benchmark_sections, ]) if live_start_date is not None: live_start_date = ep.utils.get_utc_timestamp(live_start_date) plotting.show_perf_stats(returns, benchmark_rets, positions=position...
int **range:** 0..4294967295 """ _prefix = 'infra-xtc-oper' _revision = '2017-08-24' def __init__(self): super(Pce.PrefixInfos.PrefixInfo.NodeProtocolIdentifier.IgpInformation, self).__init__() self.yang_name = "igp-information" self.yang_parent_name = "node-protocol-identifier" self.is_top_level_cl...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Jun 28 08:32:18 2018 @author: avanetten Implemention of the TOPO metric https://pdfs.semanticscholar.org/51b0/51eba4f58afc34021ae23641fc8e168fdf07.pdf """ import os import sys import time import numpy as np import networkx as nx import scipy.spatial ...
( self , name , xvar ) # self.__theta = self.make_var ( theta , 'theta_%s' % name , '#theta_{Amoroso}(%s)' % name , theta , 1 , 1.e-3 , 100 ) self.__alpha = self.make_var ( alpha , 'alpha_%s' % name , '#alpha_{Amoroso}(%s)' % name , alpha , 1 , 1.e-3 , 100 ) self.__beta = self.make_var ( beta , 'beta_%s' % n...
(xend - x0) xgap = rfpart(x0 + 0.5) xpxl1 = xend # this will be used in the main loop ypxl1 = ipart(yend) if steep: plot(ypxl1, xpxl1, rfpart(yend) * xgap) plot(ypxl1 + 1, xpxl1, fpart(yend) * xgap) else: plot(xpxl1, ypxl1, rfpart(yend) * xgap) plot(xpxl1, ypxl1 + 1, fpart(yend) * xgap) # first y-intersecti...
import abc import logging import typing import numpy as np import torch import mantrap.environment class OptimizationModule(abc.ABC): def __init__(self, t_horizon: int, weight: float = 0.0, env: mantrap.environment.base.GraphBasedEnvironment = None, has_slack: bool = False, slack_weight: float = 0.0): """Gener...
# Vax-Man, a re-implementation of Pacman, in Python, with PyGame. # Forked from: https://github.com/hbokmann/Pacman # Edited by <NAME> (2021) # Video link: https://youtu.be/ZrqZEC6DvMc import time import pygame # Ghosts multiply themselves every thirty seconds. GHOST_MULTIPLICATION_TIME_GAP = 30 # Thirty-two times...
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
self class PurchaseOrderInfoDetail(TeaModel): def __init__( self, order_number: str = None, consignee_name: str = None, consignee_id_number: str = None, consignee_phone: str = None, consignee_address: str = None, supplier_name: str = None, supplier_id: str = None, lease_id: str = None, goods_id_and_count: ...
''' util.py the utility functions of the project ''' import os import sys from warnings import warn from datetime import datetime from pathlib import Path from importlib import import_module import torch import torch.nn as nn import frontend import util.audio as audio from config import config import numpy as np impor...
#!/usr/bin/python # # Copyright (c) 2021 by VMware, Inc. ("VMware") # Used Copyright (c) 2018 by Network Device Education Foundation, Inc. # ("NetDEF") in this file. # # Permission to use, copy, modify, and/or distribute this software # for any purpose with or without fee is hereby granted, provided # that the above co...
the original Alexa event provided to the AWS Lambda handler. Returns the output generated by a Flask Ask application, which should be used as the return value to the AWS Lambda handler function. Example usage: from flask import Flask from flask_ask import Ask, statement app = Flask(__name__) ask = Ask(app, '...
than max tunable # - it can sometimes be higher if an fstart is chosen, such that our # fstep causes our fstop to go beyond fmax to cover all the band required sweep_settings.make_end_entry = False sweep_settings.end_entry_freq = 0 if sweep_settings.fstop > self.dev_properties.MAX_TUNABLE[mode]: # go back one ste...
import math, inspect, os, sys, time import pymel.core as pm import maya.cmds as cmds from zMayaTools.menus import Menu from zMayaTools import maya_logging, maya_helpers log = maya_logging.get_log() # Notes: # # - This doesn't handle inbetween targets. There's no good way to export those to # use them with game engine...
import numpy import unittest import theano from theano import config from theano import tensor as T from theano.scan_module.scan_op import Scan from theano.tests import unittest_tools as utt mode = theano.compile.mode.get_mode(config.mode) class TestGaussNewton(unittest.TestCase): """ Regression test for code exh...
""" The code that should be run locally """ import json import uuid import base64 import subprocess import re import urllib import datetime import time import webbrowser import requests from cryptography.fernet import Fernet from cryptography.hazmat.primitives.asymmetric import padding, rsa from cryptography.hazmat...
<reponame>fontanf/benchtools<filename>scripts/bench_process.py import os import os.path import argparse import json import csv import math import datetime import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt # noqa: E402 def get_trimmed_path(path): trimmed_path = path path_length = len(trimmed_p...
= int(goal_CurrentAgent[0][0]) goalIndexY = int(goal_CurrentAgent[0][1]) channel_goal = torch.zeros([self.size_map[0], self.size_map[1]]) currentState_predict = self.status_MultiAgent[name_agent]["currentState"] currentPredictIndexX = int(currentState_predict[0][0]) currentPredictIndexY = int(currentState_predict...
ElemOf(e.e)): yield self.update_repl(ctx, lambda r: lambda x: target_syntax.EArgMax(e.e, r(x)).with_type(t)) def visit_EMakeMinHeap(self, e): from cozy.structures.heaps import EMakeMinHeap yield self.make_ctx(e) t = e.type for ctx in self.visit(e.e): yield self.update_repl(ctx, lambda r: lambda x: EMakeMinHeap(...
levels that can be provided include <code>0</code> (INFO) and <code>1</code> (DEBUG).''', type='list', choices=[ 'api', 'backup', 'block', 'block_cache', 'checkpoint', 'checkpoint_cleanup', 'checkpoint_progress', 'compact', 'compact_progress', 'error_returns', 'evict', 'evict_stuck', 'evictserver', 'fil...
from __future__ import division from .base_legacy import np, TimeBased, ma, DataError from ..io.main_legacy import Saveable import h5py as h5 from .binned_legacy import TimeBindat, TimeBinner, rad_hz from .time import num2date class Velocity(TimeBased, Saveable): def __repr__(self,): mmstr = '' if self.mpltime.__...
pretty_print=pretty_print) showIndent(outfile, level, pretty_print) outfile.write('</%s%s>%s' % (namespace_, name_, eol_)) else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='detOper'): pass def exportChildren(self, outfile, level, namespace_...
#!/usr/bin/env python # encoding: utf-8 -*- """ This module contains unit tests of the rmgpy.reaction module. """ import numpy import unittest from external.wip import work_in_progress from rmgpy.species import Species, TransitionState from rmgpy.reaction import Reaction from rmgpy.statmech.translation import Transl...
""" DotKnot: software for RNA pseudoknot prediction Copyright (C) 2010-2011 <NAME> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option...
enc_serializer is None) or (enc_algo is not None and payload is not None)) Message.__init__(self) self.request = request self.registration = registration self.args = args self.kwargs = kwargs self.payload = payload self.timeout = timeout self.receive_progress = receive_progress self.caller = caller self.call...
2.0 else: z = None if self._has_ref_coordinates: # transform x and y x_mesh, y_mesh = self.get_coords(x_mesh, y_mesh) # store in cache self._cache_dict[cache_index] = CachedData([x_mesh, y_mesh, z]) if self._copy_cache: return self._cache_dict[cache_index].data else: return self._cache_dict[cache_index].data...
#!/usr/bin/env python """ Numba sampling routines """ import numpy as np import math from numba import jit, prange # import lom._cython.matrix_updates as cython_mu import lom._numba.lom_outputs as lom_outputs import lom._numba.posterior_score_fcts as score_fcts # only needed for IBP from lom.auxiliary_functions import...
from __future__ import division import argparse import logging import sys import sqlite3 import pandas as pd import webbrowser import json import dash import dash_core_components as DCC import dash_html_components as HTML import dash_table as TABLE from censere.config import Viewer as thisApp from censere.config i...
"GEMC_NVT", 1000, 300, Restart=True, check_input_files_exist=False, Coordinates_box_0="../test_files/NVT_ethane_box_0.pdb", Structure_box_0="../test_files/NVT_ethane_box_0.psf", binCoordinates_box_0="../test_files/NVT_ethane_box_0.coor", extendedSystem_box_0="../test_files/NVT_ethane_box_0.xsc", binVelocities_...
<reponame>gollum18/senslify # THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY # APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT # HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT # WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT # LIMITED TO, ...