input
stringlengths
2.65k
237k
output
stringclasses
1 value
# util.py from __future__ import print_function from collections import Mapping, OrderedDict import datetime import itertools import random import warnings import pandas as pd np = pd.np from scipy import integrate from matplotlib import pyplot as plt import seaborn from scipy.optimize import minimize from scipy.si...
dev.wait_event(['FST-EVENT-IFACE'], timeout=5) if ev is None: raise Exception("No FST-EVENT-IFACE detached (AP) for " + ifname) for t in [ "detached", "ifname=" + ifname, "group=" + group ]: if t not in ev: raise Exception("Unexpected FST-EVENT-IFACE data (AP): " + ev) def fst_detach_sta(dev, ifname, group): dev...
(troop_set_slot, "trp_temp_troop", 3, -1), (multiplayer_send_3_int_to_server, multiplayer_event_coop_send_to_server, coop_event_player_remove_selected_item, 3, ":item_remove"), (presentation_set_duration, 0), (assign, "$g_presentation_state", 0), (start_presentation, "prsnt_coop_item_select"), (else_try), (eq, "...
float. Each coefficient will be set to zero with probability `1-prob`. Otherwise coefficients will be chosen randomly from base ring (and may be zero). - ``*args, **kwds`` - passed on to random_element function of base ring. EXAMPLES:: sage: M = FreeModule(ZZ, 3) sage: M.random_element() (-1, 2, 1) sage: M...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.3 # kernelspec: # display_name: Python 3 # name: python3 # --- # + [markdown] id="view-in-github" colab_type="text" # <a href="https://colab.research.google.com/github/always-newbi...
_ArgumentT, /, ctx: tanjun_abc.Context = injecting.inject(type=tanjun_abc.Context), cache: _GuildCacheT = injecting.inject(type=_GuildCacheT), ) -> hikari.Guild: guild_id = parse_snowflake(argument, message="No valid guild ID found") if ctx.cache and (guild := ctx.cache.get_guild(guild_id)): return guild if ca...
<reponame>ashishdhngr/baserow<filename>backend/src/baserow/contrib/database/views/handler.py<gh_stars>0 from collections import defaultdict from copy import deepcopy from typing import Dict, Any, List, Optional, Iterable, Tuple from django.core.exceptions import FieldDoesNotExist, ValidationError from django.db import...
processes as possible. If there is a process where there is only 1 element, this function will adjust the ``lshape_map`` then redistribute ``arr`` so that there is not a single diagonal element on one process """ def adjust_lshape(lshape_mapi, pri, cnti): if lshape_mapi[..., 0][pri] < cnti: h = cnti - lshape_map...
<reponame>Annonymous-code-release/BINAS<gh_stars>1-10 #!/usr/bin/env python import pickle import sys import time from contextlib import suppress from datetime import datetime import matplotlib.pyplot as plt import yaml from scipy.stats import stats from torch.nn.parallel import DistributedDataParallel as NativeDDP fro...
<reponame>aka-sova/semantic-segmentation-pytorch import numpy as np import cv2 from matplotlib import pyplot as plt import matplotlib.image as mpimg import os from sklearn import linear_model, datasets from collections import defaultdict import shutil def rgb_2_hsv_pixel(rgb: list): pixel = np.zeros((1, 1, 3)) pixel...
<gh_stars>0 # Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp. # 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-...
SYMBOL-4 1D220 GREEK INSTRUMENTAL NOTATION SYMBOL-5 1D221 GREEK INSTRUMENTAL NOTATION SYMBOL-7 1D222 GREEK INSTRUMENTAL NOTATION SYMBOL-8 1D223 GREEK INSTRUMENTAL NOTATION SYMBOL-11 1D224 GREEK INSTRUMENTAL NOTATION SYMBOL-12 1D225 GREEK INSTRUMENTAL NOTATION SYMBOL-13 1D226 GREEK INSTRUMENTAL NOTATION SYMBOL-14 1D227 ...
def glAccum(op, value): '''Operate on the accumulation buffer. :param op: The accumulation buffer operation. :type op: Enumerated constant :param value: a value used in the accumulation buffer operation. :type value: float ''' pass def glAlphaFunc(func, ref): '''Specify the alpha test function. :param...
s.qerror[2] err = numpy.sqrt(x * x + y * y + z * z) if err > 20.0: pass # del spectra[i] elif numpy.add.reduce(s.qachieved) == 0.0: pass # del spectra[i] elif alt < 0.0 or alt > 120000.0: pass # odin.Warn("deleting altitude: %10.3f" % (alt/1000.0)) # del spectra[i] n2 = len(spectra) def freqMode(self, s):...
#! /usr/bin/env python """ Test source_finder.py """ __author__ = '<NAME>' from astropy.io import fits from AegeanTools import source_finder as sf from AegeanTools.wcs_helpers import Beam, WCSHelper from AegeanTools import models, flags from AegeanTools.models import classify_catalog from copy import deepcopy import ...
<gh_stars>1-10 # -*- coding: utf-8 -*- # -------------------------------------------------------------------------- # Copyright Commvault Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the L...
__builtin__.property(_get_wait) hardware_interrupt = __builtin__.property(_get_hardware_interrupt) software_interrupt = __builtin__.property(_get_software_interrupt) _pyangbind_elements = OrderedDict([('index', index), ('total', total), ('user', user), ('kernel', kernel), ('nice', nice), ('idle', idle), ('wait', w...
# -*- coding: utf-8 -*- import asyncio from .api import ( default_api_dict, API, KINDS, KIND_VALS, KIND_KEYS, OFFIC, CHI, STAR, OFFICS, UNOFFICS, ) from .api_toolkit import rearrange_params, _rearrange_args from .base_classes import AsyncInitObject, AsyncWith, SyncWith from .cache_utils import iscorofunc from .sess...
guest_obj = cpc_obj.lpars.find(name=guest_name.upper()) except zhmcclient.NotFound: raise ValueError( 'LPAR <{}> does not exist or is not accessible by ' 'this HMC user'.format(guest_name.upper())) from None return guest_obj # _get_guest() def _get_os_channel(self, guest_obj): """ Retrieve OS channel topic fr...
V34_7 = "V34.7" V34_9 = "V34.9" V35 = "V35" V35_0 = "V35.0" V35_1 = "V35.1" V35_2 = "V35.2" V35_3 = "V35.3" V35_4 = "V35.4" V35_5 = "V35.5" V35_6 = "V35.6" V35_7 = "V35.7" V35_9 = "V35.9" V36 = "V36" V36_0 = "V36.0" V36_1 = "V36.1" V36_2 = "V36.2" V36_3 = "V36.3" V36_4 = "V36.4" V36_5 = "V36.5" V36_6...
card_to_player = self.card_to_player player_to_card = self.player_to_card cards = r.h[player].cards # this is never called on a player's own hand assert self == r.PlayerRecord[cluer] assert player != cluer x = self.standard_action(cluer, player, dont_play, progress, card_to_player, player_to_card, r.discardpile, ...
return cell_grid def cells_to_relspan_grid(cells): if len(cells) == 0: return [[]] num_rows = max([max(cell['row_nums']) for cell in cells])+1 num_columns = max([max(cell['column_nums']) for cell in cells])+1 cell_grid = np.zeros((num_rows, num_columns)).tolist() for cell in cells: min_row_num = min(cell['row_...
<filename>net.py # -*- coding: utf-8 -*- import sys sys.path.append('./lib') import theano theano.config.on_unused_input = 'warn' import theano.tensor as T import numpy as np from layers import Weight, DataLayer, ConvPoolLayer, DropoutLayer, FCLayer, MaxoutLayer def cosine(x, y, epsilon=np.array(1e-6).astype(np.fl...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on 26/06/18 @author: <NAME> """ import numpy as np import scipy.sparse as sps import time, sys, copy from enum import Enum from Utils.seconds_to_biggest_unit import seconds_to_biggest_unit from Base.Evaluation.metrics import roc_auc, precision, precision_re...
# -*- coding: utf-8 -*- """F Created on Wed Feb 26 10:24:21 2020 @author: <NAME> """ import sys import math import random import numpy as np import pandas as pd from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import seaborn as sns from matplotlib import cbook from matplotlib import cm from matp...
= api_client.select_header_content_type( # noqa: E501 ["application/json"] ) # noqa: E501 # Authentication setting auth_settings = ["ApiTokenAuth", "basicAuth"] # noqa: E501 return api_client.call_api( "/settings/ldap/user_schema", "PUT", path_params, query_params, header_params, body=body_params, post_pa...
"compositions", "afterthe", "volkoff", "chinks", "non-violent", "eleni", "kristine", "croupier", "chiseled", "35th", "baskerville", "soundproof", "serrated", "shallows", "tompkins", "nye", "criminology", "girlies", "horsing", "temperate", "disarming", "drachmas", "awesomeness", "dingle", "govern...
# sqlite.py # Copyright (C) 2005, 2006, 2007, 2008, 2009 <NAME> <EMAIL> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the SQLite database. Driver ------ When using Python 2.5 and above, the built in ``sqlite3`` driver ...
from __future__ import annotations import datetime import json import typing import urllib.parse import attr from cattr import Converter from bloom.ll._compat import Literal from bloom.ll.models.application import Application from bloom.ll.models.application_commands import ( ApplicationCommand, ApplicationCommand...
<filename>haul3/haul/platforms/psion/builder_psion.py #!/usr/bin/env python # -*- coding: UTF-8 -*- """ Builder for PSION (CM/XP) * translates to OPL (using Basic language) * compiles in VM using PSION DevKit for DOS * emulates using ORG2BETA for DOS """ from haul.utils import * from haul.builder import * ...
= rest_urls['bgp_advertise_config'].format(vrf_name) if not delete_rest(dut, rest_url=url): st.banner('FAIL-OCYANG: BGP EVPN advertise-ipv6 in vrf:{} delete Failed'.format(vrf_name)) return False else: my_cmd += "address-family l2vpn {}\n".format(addr_family_modifier) my_cmd += '{} advertise ipv6 {}\n'.format(con...
# -*- coding: utf-8 -*- """ Created on Fri Jul 26 07:55:52 2019 @author: buriona """ import sys import logging import json import pandas as pd import numpy as np from pathlib import Path import plotly from os import makedirs, path from calendar import monthrange from datetime import datetime as dt from dateutil.relat...
#!/usr/bin/env python3 # coding: utf-8 ################################################################################ # UDPで受信したIoTセンサ機器の値を棒グラフで表示します。 # (Webブラウザで http://127.0.0.1:8080 にアクセスするとグラフ表示されます) # # Copyright (c) 2021 <NAME> ################################################################################ #...
first element is the start of the temporal interval. The specified instance in time is **included** in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is **excluded** from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc-editor.org...
Set of waypoints > *Returns* `uuv_waypoins.WaypointSet`: Filtered set of waypoints """ wp_set = uuv_waypoints.WaypointSet( inertial_frame_id=self.inertial_frame_id) for i in range(waypoint_set.num_waypoints): wp = waypoint_set.get_waypoint(i) if wp.z > 0 and self.inertial_frame_id == 'world': continue if ...
= bit_count(state[k]) # Round 1 - 10 for j in range(1, 11): old_state = state state = aes_funcs.subbytes(state) state = aes_funcs.shiftrows(state) if (j < 10): state = aes_funcs.mixcolumns(state) state = np.bitwise_xor(state, subkey[j]) for k in range(16): if leakage_model == 'HAMMING_DISTANCE': leakage[j][...
<filename>utils/jornada_plot.py # =============================================================================== # Copyright 2016 gabe-parrish # # 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...
einsum('ij,IJ->iIjJ',I,Ii) I.merge_inds([0,1]) I.merge_inds([1,2]) # Contract identity with the bra res = einsum('gkhl,Qq->gkQlhq',braten,I) # Merge correct inds res.merge_inds([0,1,2]) res.merge_inds([2,3]) # Add to bot_env bot_env.append(res) # Last site is the current right bound_mpo res = einsum('fio,or...
<reponame>andreacosolo/granite #!/usr/bin/env python ################################################################# # # vcf_parser # <NAME> # Harvard Medical School # <EMAIL> # ################################################################# ################################################################# # # L...
import keyboard import time import sys import random from utils import clear from utils import GoBack from utils import User from rich import print from rich.console import Console from rich.align import Align from rich.prompt import Prompt from rich.panel import Panel from rich.layout import Layout from rich.text impo...
# pylint: disable=global-statement,redefined-outer-name import argparse import csv import glob import json import os import yaml from flask import Flask, jsonify, redirect, render_template, send_from_directory from flask_frozen import Freezer from flaskext.markdown import Markdown site_data = {} by_uid = {} archive_p...
can\'t figure out how to log proper error codes, Ask him why !song isnt working') #from JPARKZ elif cmd == "rl": if cmdargs == []: self.post_message(usr + ', Does your carer know you are on the internet right now?') else: self.post_message(cmdargs[0] + ', Does your carer know you are on the internet right now?')...
<gh_stars>0 ################################################################################ # Copyright (c) 2009-2019, National Research Foundation (Square Kilometre Array) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a c...
import warnings class response_handler(): """ The Class handles the creation of Dialogflow Responses .. note:: There are 2 types of Rich Responses which can be created using this class. They are: Generic Rich Responses and Google Assistant Rich Responses. Generic Responses work on all platforms except Google Assis...
view. """ CONTENT_MODE_BOTTOM_RIGHT = ui_constants.CONTENT_MODE_BOTTOM_RIGHT """ The option to align the content in the bottom-right corner of the view. """ # MARK: - Horizontal Alignment HORIZONTAL_ALIGNMENT = ui_constants.HORIZONTAL_ALIGNMENT HORIZONTAL_ALIGNMENT_CENTER = ui_constants.HORIZONTAL_ALIGNMENT_CENTER ...
in opt.get('datatype', ''): # we only set up optimizers when training # we only set this up for the original instance or hogwild ones self.clip = opt.get('gradient_clip', -1) # set up optimizer lr = opt['learningrate'] optim_class = Seq2seqAgent.OPTIM_OPTS[opt['optimizer']] kwargs = {'lr': lr} if opt.get('mome...
redishash(data)) routes = data.get('routes') if routes: for route in routes[:2]: pipe.sadd(f'engagement:intcon:out:{route}', nameid) pipe.execute() response.status_code, result = 200, {'passed': True} except Exception as e: response.status_code, result = 500, None logify(f"module=liberator, space=libreapi, act...
<gh_stars>0 # ************************************************************************* # Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. # ************************************************************************* from cobraj.mit.request import ConfigRequestType from cobra.mit.naming import Dn from .jsonco...
import inspect import torch import collections import textwrap import functools import warnings from typing import Dict, List, Set, Type import torch._jit_internal as _jit_internal from torch.jit.frontend import get_default_args, get_jit_def, get_class_properties from torch.jit._builtins import _find_builtin from torc...
import sys import warnings from collections import defaultdict from itertools import product, combinations import numpy as np import pandas as pd import scipy.stats from networkx import Graph from plotly.graph_objs import Scatter, Figure, Layout from scipy.stats._continuous_distns import _distn_names from scipy.stats....
max number of lines has been reached yet if nlines is not None: if line_count >= nlines: break # Bundle and save data set # TODO: [nfr] remove this from here, return dictionary and make assignment in __init__ return dict(section_list=pd.DataFrame(section_list), feature_mapping=pd.DataFrame(feature_section_mappin...
= ds.set_coords( ['yyyyddd', 'mission_time', 'start_time', 'start_latitude', 'start_longitude', 'start_altitude', 'end_time', 'end_latitude', 'end_longitude', 'end_altitude', ]) return ds def l2_v5_1_5_2_binary_to_dataset(file) -> xr.Dataset: """ Read the Level 2 Solar Event Species Profiles for a version 5.1/5...
timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server....
<filename>rmsd/calculate_rmsd.py #!/usr/bin/env python __doc__ = \ """ Calculate Root-mean-square deviation (RMSD) of Two Molecules Using Rotation =========================================================================== Calculate Root-mean-square deviation (RMSD) between structure A and B, in XYZ or PDB for...
# example_1 --> calculator """ print("\tCALCULATOR\n") sayi1 = float(input("enter a value:")) operator = input("operator:") sayi2 = float(input("enter a value")) if operator == "+": print(sayi1+sayi2) elif operator == "-": print(sayi1-sayi2) elif operator == "*": print(sayi1*sayi2) elif operator == "/": print(sayi1...
<reponame>Sim7b/jellyfin_ha<filename>__init__.py """The jellyfin component.""" import logging import time import re import traceback import collections.abc from typing import Mapping, MutableMapping, Optional, Sequence, Iterable, List, Tuple import voluptuous as vol from homeassistant.exceptions import ConfigEntryNot...
will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth...
not typed_ast3.BinOp: raise NotImplementedError('root operation initialisation') root_operation = typed_ast3.BinOp( left=None, op=root_operator_type(), right=operand) operation = root_operation continue if operation_type is not None: assert operation_type is root_operation_type, (operation_type, root_operation_t...
+ m.b145 - m.b262 <= 0) m.c3747 = Constraint(expr= - m.b138 + m.b146 - m.b263 <= 0) m.c3748 = Constraint(expr= - m.b138 + m.b147 - m.b264 <= 0) m.c3749 = Constraint(expr= - m.b139 + m.b140 - m.b265 <= 0) m.c3750 = Constraint(expr= - m.b139 + m.b141 - m.b266 <= 0) m.c3751 = Constraint(expr= - m.b139 + m.b142 - m.b2...
fluid, wall material. The reference area must always be the fluid-wall-contact-area for consistency with other calculations. Parameters: ----------- A_i : float, int The fluid-wall-contact area PER CELL. Calculated with: A_i = np.pi * r_i * 2 * grid_spacing r_i : float, int Radius in [m] of the fluid-wall-con...
} return s.charAt(i++); }, '__iter__': function() { return this; } }; }; } else { String.prototype.__iter__ = function() { var i = 0; var s = this; return { '__array': this, 'next': function(noStop) { if (i >= s.length) { if (noStop === true) { return; } throw $pyce(@{{StopIteration}}()); } return s...
number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] include = Match(r'\s*#\s*include\s+[<"]([^<"]+)[">]', line) # Flag unapproved C++14 headers. if include and include.group(1) in ('scoped_allocator', 'shared_mutex'): error(filename, linenum, '...
<reponame>wikimedia/abstract-wikipedia-data-science<gh_stars>1-10 import sys import mwapi import toolforge import pandas as pd import pymysql import numpy as np import argparse from urllib.parse import unquote import utils.db_access as db_acc import constants pymysql.converters.encoders[np.int64] = pymysql.converters....
<filename>gui/communication/esp32serial.py """ Library to interface with the ESP32 """ from threading import Lock import serial # pySerial from . import ESP32Alarm, ESP32Warning __all__ = ("ESP32Serial", "ESP32Exception") class ESP32Exception(Exception): """ Exception class for decoding and hardware failures. ""...
import random from typing import Union, Sequence, List, Type, Tuple, Optional import numpy as np import torch import torch.nn import torch.fft as fft import torch.nn.functional as F import torchvision.transforms as VT import torchvision.transforms.functional as VF from torchvision.utils import save_image, make_grid f...
import sys import os from collections import OrderedDict from ttfautohint._compat import ( ensure_binary, ensure_text, basestring, open, IntEnum, ) USER_OPTIONS = dict( in_file=None, in_buffer=None, out_file=None, control_file=None, control_buffer=None, reference_file=None, reference_buffer=None, reference_in...
import numpy as np from gym import utils from gym.envs.mujoco import mujoco_env import os from . import path DEFAULT_CAMERA_CONFIG = { 'trackbodyid': 0, 'distance': 1.0, 'lookat': np.array((0.0, 0.0, 0)), 'elevation': 0, } def sin(t,omega=1.5,phi=0.):#1 return np.sin(omega*t+phi) def cos(t,omega=1.5,phi=0.):#1 ...
#!/usr/bin/env python # Copyright 2017 Calico LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed ...
"Species_1" ON "Animal_3".species = "Species_1".uuid WHERE ( "Animal_1".name LIKE '%%' || %(wanted)s || '%%' ) AND ( "Animal_4".parent IS NOT NULL OR "Animal_2".uuid IS NULL ) AND ( "Species_1".uuid IS NOT NULL OR "Animal_3".parent IS NULL ) """ check_test_data( self, test_data, expected_match, expecte...
""" Connections =========== .. Copyright: Copyright 2019 Wirepas Ltd under Apache License, Version 2.0. See file LICENSE for full license details. """ # pylint: disable=locally-disabled, too-many-lines try: import MySQLdb except ImportError: print("Failed to import MySQLdb") pass import logging import json ...
i_save = 0 n = N_BASE_STATES n1 = self.gyro_model.n_states n2 = self.accel_model.n_states if self.gyro_model.scale is not None: gyro = theta / self.dt gyro = np.vstack((gyro, 2 * gyro[-1] - gyro[-2])) else: gyro = None if self.accel_model.scale is not None: accel = dv / self.dt accel = np.vstack((accel, 2...
<reponame>arpitgogia/mars_city<filename>MOCC/src/planning/PlexilPlanStorage/PlexilPlanStorage.py #!/usr/bin/env python # -*- coding:utf-8 -*- ############################################################################## ## license : ##============================================================================ ## #...
<gh_stars>10-100 import tensorflow as tf import numpy as np from groupy.gconv.tensorflow_gconv.splitgconv2d import gconv2d, gconv2d_util import cnn_params from keras_gcnn.layers import GBatchNorm from keras_gcnn.layers.pooling import GroupPool MOVING_AVERAGE_DECAY = 0.98 BN_DECAY = MOVING_AVERAGE_DECAY BN_EPSILON = 0...
<filename>test/python/test_identifiers.py # -*- coding: utf-8 -*- # pylint: disable=invalid-name,missing-docstring,broad-except # Copyright 2018 IBM RESEARCH. 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. # Yo...
'usecs': 0}, 351: {'five_min_cpu': 0.0, 'five_sec_cpu': 0.0, 'invoked': 18, 'one_min_cpu': 0.0, 'pid': 355, 'process': 'VTEMPLATE IPC fl', 'runtime': 0, 'tty': 0, 'usecs': 0}, 352: {'five_min_cpu': 0.0, 'five_sec_cpu': 0.0, 'invoked': 187, 'one_min_cpu': 0.0, 'pid': 356, 'process': 'CEM PROC', 'runtime'...
2.371743E+01, 5.973090E+01, 1.070476E+02, 1.631783E+02, 2.267778E+02, 2.970405E+02, 3.734061E+02, 4.554693E+02, 5.429478E+02, 6.356653E+02, 7.335395E+02, 8.365694E+02, 9.448250E+02, 1.058437E+03, 1.177588E+03, 1.302505E+03, 1.433451E+03, 1.570721E+03, 1.714634E+03, 1.865531E+03, 2.023770E+03, 2.189723E+03, 2.363775E...
<filename>wrapper/source_hosts.py """ Source hosts Some migration sources require significant setup before they can export block devices with nbdkit. This module holds the code used to set up nbdkit exports on such sources. For example, the current OpenStack export strategy is to shut down the source VM, attach its v...
Represents a match between a query and a saved artifact. `level` is a string describing the match level, ranging from "functional" to "exact". """ metadata_url = attr.ib() level = attr.ib() # TODO Should we merge this with InventoryEntry? @attr.s(frozen=True) class ExternalCacheItem: """ Represents an inventor...
import collections import os import tempfile import typing import audbackend import audeer import audformat import audiofile from audb.core import define from audb.core.api import dependencies from audb.core.dependencies import Dependencies from audb.core.repository import Repository def _check_for_duplicates( db:...
_ida_hexrays.user_iflags_find(*args) def user_iflags_insert(*args): """ user_iflags_insert(map, key, val) -> user_iflags_iterator_t Insert new ( 'citem_locator_t' , int32) pair into user_iflags_t. @param map (C++: user_iflags_t *) @param key (C++: const citem_locator_t &) @param val (C++: const int32 &) "...
<reponame>gitter-badger/BoAT-X-Framework<filename>tools/eth2c.py #!/usr/bin/python # Copyright (C) 2018-2021 aitos.io # # 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.or...
import glob, os, shutil, sys, json from pathlib import Path import pylab as plt import trimesh import open3d from easydict import EasyDict import numpy as np from tqdm import tqdm import utils from features import MeshFPFH FIX_BAD_ANNOTATION_HUMAN_15 = 0 # Labels for all datasets # ----------------------- sigg17_pa...
# OpenPharmacophore from openpharmacophore._private_tools.exceptions import InvalidFeatureError, InvalidFileFormat from openpharmacophore.io import (from_pharmer, from_moe, from_ligandscout, to_ligandscout, to_moe, to_pharmagist, to_pharmer) from openpharmacophore import PharmacophoricPoint from openpharmacophore.algo...
<reponame>jq-shell/python-jqsh import decimal import enum import jqsh.context import jqsh.filter import jqsh.values import string import unicodedata class Incomplete(Exception): pass TokenType = enum.Enum('TokenType', [ 'assign', 'close_array', 'close_object', 'close_paren', 'colon', 'comma', 'command', 'com...
== None or cursor.kind.is_invalid() or cursor.spelling != var: cursor = self.find_type(data, template[0]) else: pointer = 0 # get the pointer level from the cursor instead if cursor != None and not cursor.kind.is_invalid() and \ cursor.spelling == typename and \ cursor.kind == cindex.CursorKind.VAR_DECL: # We're...
"""Convert the object references in each Rule in a Rules_List to the actual objects. This method assumes that all the rules in the list are from the same device. :type device_id: int :param device_id: The ID of the device that contains the rules. If not specified, taken from the first rule. :type rule_list: Secure...
ids_trip = self.times_depart.get_ids_sorted() ids_vtype = self.ids_vtype[ids_trip] #ids_vtypes_exclude = self.ids_vtype.get_ids_from_indices(vtypes_exclude) inds_selected = np.ones(len(ids_vtype), np.bool) for id_vtype in ids_vtype_exclude: inds_selected[ids_vtype == id_vtype] = False ids_trip_selected = ids_tri...
specific to the script, which are edit in our HTML form, in enter_edition_mode(). # They must have a default value. Maybe we could always have an edition mode when their value # is not set. # If the parameter is "cimom", it will extract the host of Uris like these: Wee GetHost() # https://jdd:test@acme.com:5959/cim...
> 475 or head.ycor() < -273 or head.xcor() < -478 or head.ycor() > 231 : time.sleep(1) head.goto(0,0) head.direction = "stop" count += 1 for segment in segments: segment.goto(10000,10000) segments.clear() score = 0 delay = 0.03 if count > 2 : break else : pen.clear() pen.write("Score: {} High Score:...
<reponame>lcremer/Maya-Rigging import pymel.core as pc import re from Maya_Rigging.Utils import AttrUtil as atu from ...Utils import * from Maya_Rigging.Utils.CharUtilsLib import * from Maya_Rigging.Core import JointStretchNetworkLib as js def buildTwistJointSetup(name, side, joint, stretchType, ikFkType, rotConnect,...
<filename>bin/getCmdbData.py #!/usr/bin/python -u ####################################################### # # Remedy REST mediator for topology inclusion into ASM # # 02/09/21 - <NAME> (<EMAIL>) # ####################################################### import sys from httplib import IncompleteRead import time import ...
<reponame>lakhlaifi/RedHat-Ansible #!/usr/bin/python # Copyright 2014 <NAME>, Hothead Games 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...
self.assertRaises(exception.NotFound, resg.FnGetAtt, 'resource.2') self.assertIn("Member '2' not found in group resource 'group1'.", str(ex)) def test_get_attribute_convg(self): cache_data = {'group1': node_data.NodeData.from_dict({ 'uuid': mock.ANY, 'id': mock.ANY, 'action': 'CREATE', 'status': 'COMPLETE', ...
<reponame>MaciejSzaflik/tirt-W4-Project # -*- coding: utf-8 -*- ''' This module handles RTP payload for MJPEG codec as described in RFC2435. JPEG header restoration code is taken from that RFC, but adapted to Python. ''' # The following code can be used to create a quantization table from a # Q factor: # Tables with l...
from keras.models import Model from keras.layers import Input, Activation, Dropout, Merge, TimeDistributed, Masking, Dense from keras.layers.recurrent import LSTM, GRU from keras.layers.embeddings import Embedding from keras.regularizers import l2 from keras.optimizers import Adam from keras import backend as K impor...
<filename>src/pretix/plugins/banktransfer/payment.py<gh_stars>0 # # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 <NAME> and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of ...
<gh_stars>0 # Author: <NAME>, <NAME> # Last Updated: 5/2/2005 # # This tutorial shows how to detect and respond to collisions. It uses solids # create in code and the egg files, how to set up collision masks, a traverser, # and a handler, how to detect collisions, and how to dispatch function based # on the collisions...
number *) # locate begin # scan begin # function # | NUM (m, n) -> Some (Num (m, n)) # | _ -> None # end # end ; # # locate (kwd "TRUE" <!> Internal B.TRUE) ; # locate (kwd "FALSE" <!> Internal B.FALSE) ; # locate (kwd "BOOLEAN" <!> Internal B.BOOLEAN) ; # locate (kwd "STRING" <!> Internal B.STRING) ; # # (* locate (pu...
import argparse import pandas def mean_std_table( datasets, dataset_labels, metrics, metric_labels, model_order, model_labels, all_data, output_file): # set output_file output_file = open(output_file, "w") # stats stats = ["Mean", "Median", "Peak"] # keep relevant columns all_data = all_data[["...
u0 {1,S} 7 C u0 {3,D} """, thermo = u'Cs-(Cds-Cds)CbCtCt', shortDesc = u"""""", longDesc = u""" """, ) entry( index = 821, label = "Cs-CbCbCtCds", group = """ 1 * Cs u0 {2,S} {3,S} {4,S} {5,S} 2 Cb u0 {1,S} 3 Cb u0 {1,S} 4 Ct u0 {1,S} 5 [Cd,CO] u0 {1,S} """, thermo = u'Cs-(Cds-Cds)CbCbCt', shortDesc = u""""...