input
stringlengths
2.65k
237k
output
stringclasses
1 value
undo_converters_stack.pop() def undo_converters(): print_spacer=True for parent in reversed(undo_converters_list): o = parent.args_converters.pop() if want_prints: if print_spacer: print(f"##") print_spacer = False print(f"## undo converter") print(f"## {parent=}") print(f"## popped {o=}") print(f"## arg_c...
<gh_stars>1-10 import pandas as pd from .algo import * from .validate import * from .validate import DCAError __all__ = ['DecisionCurveAnalysis'] # only public member should be the class class DecisionCurveAnalysis: """DecisionCurveAnalysis(...) DecisionCurveAnalysis(algorithm='dca', **kwargs) Create an object o...
# -*- coding: utf-8 -*- import numpy as np import random import math from Policy import * from my_moduler import get_module_logger, get_state_logger from mulligan_setting import * from adjustment_action_code import * mylogger = get_module_logger(__name__) # mylogger = get_module_logger('mylogger') import itertools #st...
IMAG_TOL) otherParams[i, i] = Lmx[i, i].real for j in range(i): otherParams[i, j] = Lmx[i, j].real otherParams[j, i] = Lmx[i, j].imag else: # param_mode == "unconstrained": otherParams mx stores otherProjs (hermitian) directly for i in range(bsO - 1): assert(_np.linalg.norm(_np.imag(otherProjs[i, i])) < IMAG_TO...
<filename>src/abe_sim/brain/midbrain.py import os import sys import math import time import numpy as np import abe_sim.brain.geom as geom from abe_sim.brain.cerebellum import Cerebellum from abe_sim.brain.geom import angle_diff, euler_to_quaternion, euler_diff_to_angvel, invert_quaternion, quaternion_product, quaterni...
"g" = "http://a/b/c/g" # http://a + /b/c/ + g # "./g" = "http://a/b/c/g" # http://a + /b/c/ + g # "g/" = "http://a/b/c/g/" # http://a + /b/c/ + g + / # "/g" = "http://a/g" # http://a + /g # "//g" = "http://g" # http: + //g # "?y" = "http://a/b/c/d;p?y" # scheme + netloc + path + param + nquery # "g?y" = "h...
= Var(within=Reals,bounds=(0,100),initialize=0) m.x5077 = Var(within=Reals,bounds=(0,100),initialize=0) m.x5078 = Var(within=Reals,bounds=(0,100),initialize=0) m.x5079 = Var(within=Reals,bounds=(0,100),initialize=0) m.x5080 = Var(within=Reals,bounds=(0,100),initialize=0) m.x5081 = Var(within=Reals,bounds=(0,100),initia...
= self.get('item/' + itemId) name = item['name'] offset = 0 first = True while True: files = self.get('item/%s/files' % itemId, parameters={ 'limit': DEFAULT_PAGE_LIMIT, 'offset': offset }) if first: if len(files) == 1 and files[0]['name'] == name: self.downloadFile( files[0]['_id'], os.path.join(dest, s...
bin_format = op + 'b'*4 + 'a'*4 + op2_1 + op2_2 + 'n'*2 + 'c'*4 + 'd'*4 def parse(self, bitstrm): data = Instruction.parse(self, bitstrm) data = {"a": int(data['a'], 2), "b": int(data['b'], 2), "c": int(data['c'], 2), "d": int(data['d'], 2), "n": int(data['n'], 2)} log_this(self.name, data, hex(self.addr)) ...
""" Object to manage regular expressions, try to optimize the result: - '(a|b)' => '[ab]' - '(color red|color blue)' => 'color (red|blue)' - '([ab]|c)' => '[abc]' - 'ab' + 'cd' => 'abcd' (one long string) - [a-z]|[b] => [a-z] - [a-c]|[a-e] => [a-z] - [a-c]|[d] => [a-d] - [a-c]|[d-f] => [a-f] Operation: - str(...
# coding: utf-8 """ Location API Geolocation, Geocoding and Maps # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class GeolocationResponseSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Re...
<reponame>YerongLi2/LTVRR<gh_stars>10-100 # Written by <NAME> on Jan 2020 import numpy as np import pandas as pd import json import os.path as osp # import seaborn as sns # not critical. import matplotlib.pylab as plt # In[9]: import os import re def files_in_subdirs(top_dir, search_pattern): # TODO: organize pro...
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: <NAME> <<EMAIL>> # Copyright (C) 2016 RaRe Technologies """This script using for extracting plain text out of a raw Wikipedia dump. Input is an xml.bz2 file provided by MediaWiki that looks like <LANG>wiki-<YYYYMMDD>-pages-articles.xml.bz2 or <LANG>...
in range(mc_count): # Do not change these swtch_flg = False fol_swtch_flg = False swtch_cost = False count_s = 0 #### To make obstacles from here on. Defining as rings to allow nonconvexity # Grid obs1 and obs2 now and shift them around to run all the simulations obs1x_r = random.uniform(0.,0.2) obs1y_r = ...
<filename>pact/pact.py """API for creating a contract and configuring the mock service.""" from __future__ import unicode_literals import fnmatch import os import platform from subprocess import Popen import psutil import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3 import Retry ...
the moment, we don't have any uncompressed data self.uncompressed = None self._decompress() # decompress the contents as needed # Prepare storage to keep track of the offsets # of the blobs in the cluster. self._offsets = [] # proceed to actually read the offsets of the blobs in this cluster self._read_offsets()...
dddddddddddddldd", "6-9 x: nxvkxvxxx", "18-19 x: xsxxxrdxbkjmbdvfrrx", "12-13 j: jnjjjgjjqrjjs", "14-16 r: rrrrrmrrrrqrrxrvrvr", "5-9 h: hhvvhmzjn", "5-6 w: wwgfzt", "10-13 v: vvvvvsvvvtvvxvvrvvv", "2-4 h: hwhh", "4-8 s: ssssssshss", "5-12 n: nnnnnnnnnnncn", "2-3 x: bxxmxcdzlj", "14-16 x: chpxcprsxhxvkxzc",...
# Create trigger_queue if none exists if queue is None: trigger_queue = Queue.Queue() else: trigger_queue = queue # Start triggerListener (for incoming events to trigger actions) obj_trigger_listener = TriggerListener(listen_port, trigger_queue) obj_trigger_listener.start() # Start triggerHandler (handling inc...
<filename>params.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ lists and dictionaries of column names mappings of new columns to columns of original survey mappings of column headers to creative habits renaming dictionaries etc. """ import pathlib as pl # paths wd = pl.Path.cwd() datapath = wd/"data" result...
import datetime import json import os import time import requests import jsonpickle # Global Variables: # Used for Url Requests : Time_Period = 5 * 60 # 5 min in seconds Requests = 2000 # number of requests # Today's Date subtracting 3 Months (31days in a month): last_3month = datetime.date.today() - datetime.timedel...
""" Skrafldb - persistent data management for the Netskrafl application Copyright (C) 2020 <NAME>. Author: <NAME> The GNU General Public License, version 3, applies to this software. For further information, see https://github.com/mideind/Netskrafl This module stores data in the Google App Engine NDB (see ht...
# -*- coding: utf-8 -*- import datetime import os import mock from django.contrib.auth.models import User from django.test import TestCase from django_dynamic_fixture import fixture, get from django.utils import timezone from allauth.socialaccount.models import SocialAccount from readthedocs.builds.constants import ...
#!/usr/bin/env python3 # # Copyright (c) 2020-2021 Couchbase, 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 # # Unles...
sub.set_ylim(ranges[2]) _plth0, = sub.plot([], [], c='k', ls='--') sub.legend([_plth0], ['no noise model'], loc='lower right', handletextpad=0.1, fontsize=20) bkgd = fig.add_subplot(111, frameon=False) bkgd.set_xlabel(r'$M_r$ luminosity', labelpad=10, fontsize=25) bkgd.tick_params(labelcolor='none', top=Fa...
0069 0069", 8572: "<compat> 006C", 8573: "<compat> 0063", 8574: "<compat> 0064", 8575: "<compat> 006D", 8585: "<fraction> 0030 2044 0033", 8602: "2190 0338", 8603: "2192 0338", 8622: "2194 0338", 8653: "21D0 0338", 8654: "21D4 0338", 8655: "21D2 0338", 8708: "2203 0338", 8713: "2208 0338", 8716: "220B 033...
from __future__ import annotations from ..typecheck import * from ..import core from ..breakpoints import ( Breakpoints, SourceBreakpoint, ) from ..watch import Watch from . import types as dap from .variable import ( Variable, SourceLocation, ScopeReference, ) from .configuration import ( AdapterConfigurati...
"""Demo Kaplan-Meier surivival analysis. MPyC demo based on work by <NAME>, partly covered in Section 6.2 of his paper 'Pinocchio-Based Adaptive zk-SNARKs and Secure/Correct Adaptive Function Evaluation', AFRICACRYPT 2017, LNCS 10239, pp. 21-39, Springer (see https://eprint.iacr.org/2017/013 for the latest version). ...
[i["id"] for i in response.json["data"] if i["status"] == "pending"][-1] response = self.app.patch_json( "/tenders/{}/awards/{}?acc_token={}".format(self.tender_id, award_id, self.tender_token), {"data": {"status": "active", "qualified": True, "eligible": True}}, ) self.assertEqual(response.status, "200 OK") re...
used in combination with crop factors to provide daily estimates of actual crop evaporation for many crop types. Parameters: - airtemp: (array of) daily average air temperatures [Celsius]. - rh: (array of) daily average relative humidity values [%]. - airpress: (array of) daily average air pressure data [Pa]. -...
m.name: new_metal = m return new_metal # Loads any custom made metals the user has previously created # Loads it from data/custom_metals.dat - a binary file # Parameter: drop - A DropDown object to add the metals to def load_custom_metals(drop): # Tries to open the file, if it can't, catches exception and tells us...
#! /use/env/bin python import os import copy from collections import OrderedDict from CP2K_kit.tools import data_op from CP2K_kit.tools import log_info from CP2K_kit.tools import traj_info def check_step(init_step, end_step, start_frame_id, end_frame_id): ''' check_step: check the input step Args: init_step : i...
of type "logical" in section "Utilities::oct-conductivity_spectrum" ''', categories=[x_octopus_parserlog], a_legacy=LegacyDefinition(name='x_octopus_parserlog_ConductivityFromForces')) x_octopus_parserlog_ConductivitySpectrumTimeStepFactor = Quantity( type=str, shape=[], description=''' Octopus parser log ent...
dropna = None, prefunc2apply=None, postfunc2apply=None, show_progress=False): """ Load the Journal DataFrame from a preprocessed directory, or parse from the raw files. Parameters ---------- preprocess : bool, default True, Optional Attempt to load from the preprocessed directory. columns : list, default None,...
from __future__ import division, absolute_import __copyright__ = "Copyright (C) 2012 <NAME>" __license__ = """ 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 witho...
params["module_name"] = "activation_function_operators" # params["operator_name"] = "operator_change_activation_function" # # return params # # def perform_mutation(self, elem): # res, type, pos = mu.is_activation_assignment(elem) # #TODO: chto vmesto if? # if type == 'K': # for ptn, kwd in enumerate(elem.value.args[0]...
import array import copy import pickle import numpy as np import pytest from mspasspy.ccore.seismic import (_CoreSeismogram, _CoreTimeSeries, Seismogram, SeismogramEnsemble, SlownessVector, TimeSeries, TimeSeriesEnsemble, TimeReferenceType) from mspasspy.ccore.utility import (AtomicType, dmatrix, ErrorLogger...
{ "random_values": "007aaf954de7435d87abe06fb957cbade21732c6ceafb80335e89a5ca322440e", "initial_state_hash": "c30cc6dddf17d6d9a66b1d662ff8a7960670853b1c6172100e2fd3719c98e8c2", "final_state_hash": "459beeb952c7dcbe8632a9684684321e1408b5bebdf5a474d9cc85e7d19efdf6", }, ( "LCG128Mix", "seed", "inc", 0, "output",...
<reponame>vhn0912/Finance<filename>Portfolio_Strategies/backtest_strategies.py import numpy as np import pandas as pd import yfinance as yf import datetime as dt import warnings from yahoo_fin import stock_info as si import talib warnings.filterwarnings('ignore') pd.set_option('display.max_columns', None) stock = inp...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
srv_msg.client_send_msg('REQUEST') misc.pass_criteria() srv_msg.send_wait_for_message('MUST', None, 'REPLY') misc.test_procedure() srv_msg.client_does_include('Client', None, 'empty-client-id') srv_msg.client_save_option('IA_NA') srv_msg.client_save_option('server-id') srv_msg.client_add_saved_option('DONT ') ...
import pytest from rundoc import BadInterpreter, BadEnv, RundocException, CodeFailed import rundoc.block as rb import rundoc.commander as rc import rundoc.parsers as rp import rundoc.__main__ as rm from pygments import highlight from pygments.formatters import Terminal256Formatter from pygments.lexers import get_lexe...
from __future__ import print_function import torch from scipy.ndimage.filters import gaussian_filter import numpy as np from PIL import Image import math import cv2 import matplotlib.pyplot as plt import torch.nn.functional as functional import os from torch.autograd import Variable def load_heatmap(hm_path): hm_arr...
: , optional (default : None) A palette (list) of colors to use for coloring categorical values. Only applied if `cmap` is set to 'categorical'. colorbar : boolean, optional (default : True) If True, plot the colorbar next to the figure. ticks : boolean (default: True) If True, show tickmarks along x and y axes...
<reponame>S0mbre/proxen # -*- coding: utf-8 -*- ## @package proxen.gui # @brief The GUI app main window implementation -- see MainWindow class. import os, json, struct, webbrowser import traceback from qtimports import * import utils import sysproxy # ******************************************************************...
== "NAME" and \ (value == "deployment_settings" or \ value == "settings"): self.fflag = 1 # Get module name from deployment_setting.modules list elif self.tflag == 0 and self.func_name == "modules" and \ token.tok_name[id] == "STRING": if value[1:-1] in modlist: self.mod_name = value[1:-1] # If 'T' is encoun...
from __future__ import division import os import time import inspect import logging import itertools import sys import dolfin as df import numpy as np import cProfile import pstats from aeon import timer from finmag.field import Field from finmag.physics.llg import LLG from finmag.physics.llg_stt import LLG_STT from fi...
[![AnalyticsDojo](https://github.com/rpi-techfundamentals/spring2019-materials/blob/master/fig/final-logo.png?raw=1)](http://rpi.analyticsdojo.com) <center><h1>Boston Housing</h1></center> <center><h3><a href = 'http://rpi.analyticsdojo.com'>rpi.analyticsdojo.com</a></h3></center> #This uses the same mechansims. %mat...
open('show\\all-time.txt', 'w') file_all_name = open('show\\all-name.txt', 'w') file_all_subscribers = open('show\\all-subscribers.txt', 'w') file_dirty_time = open('show\\dirty-time.txt', 'w') file_dirty_name = open('show\\dirty-name.txt', 'w') file_dirty_subscribers = open('show\\dirty-subscribers.txt', 'w') fi...
<filename>ummon/features/portilla_simoncelli_tm/filterbank_simoncelli.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created by <NAME> at 09.08.2018 """ from __future__ import division import numpy as np from scipy.special import factorial def buildSCFpyr(im, ht=-1, order=3, twidth=1): # default max_ht = n...
(move.uid, move.parent): self.add_option( req, 'move here', 'here', hint='move page %s here' % move.uid) else: if req.user.can('admin page'): self.add_option( req, 'move/copy', 'move', hint='mark for moving or copying') # temporarily disable Export/Imprt until it can be fully tested... (IHM Dec 2015) # if s...
<reponame>busyyang/torch_ecg """ """ import os, sys, re, logging import time, datetime from functools import reduce from copy import deepcopy from itertools import repeat from numbers import Real, Number from typing import Union, Optional, List, Tuple, Dict, Sequence, NoReturn import numpy as np import pandas as pd ...
-------------------------------------------------------- def _copy(self, deep=False, rows=None, cols=None, base_index=0, cls=None): """ Bracket indexing that returns a dataset will funnel into this routine. deep : if True, perform a deep copy on column array rows : row mask cols : column mask base_index...
<filename>escriptcore/py_src/faultsystems.py<gh_stars>0 ############################################################################## # # Copyright (c) 2003-2020 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://...
Resume a SQL pool. examples: - name: Resume a SQL pool. text: |- az synapse sql pool resume --name sqlpool --workspace-name testsynapseworkspace --resource-group rg """ helps['synapse sql pool delete'] = """ type: command short-summary: Delete a SQL pool. examples: - name: Delete a SQL pool. text: |- az synapse ...
*(string) --* The version ID of the Amazon Redshift engine that is running on the cluster. - **AllowVersionUpgrade** *(boolean) --* A boolean value that, if ``true`` , indicates that major version upgrades will be applied automatically to the cluster during the maintenance window. - **NumberOfNodes** *(integer) ...
""" Copyright (c) 2016, Granular, Inc. All rights reserved. License: BSD 3-Clause ("BSD New" or "BSD Simplified") Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyr...
import wx import numpy as np from os import remove from os.path import splitext, exists from FileHandler import ReadXYZ from scipy.signal import butter, filtfilt from sklearn.decomposition import PCA class Results(): def __init__(self): """EMPTY INITIATION""" def updateAll(self, Data): # Get Sp...
+ 17* m.b38*m.b89 + 18*m.b38*m.b92 + 19*m.b38*m.b95 + 20*m.b38*m.b98 + 21*m.b38*m.b101 + 22*m.b38* m.b104 + 23*m.b38*m.b107 + 24*m.b38*m.b110 + 25*m.b38*m.b113 + 26*m.b38*m.b116 + 27*m.b38*m.b119 + 28*m.b38*m.b122 + 29*m.b38*m.b125 + 30*m.b38*m.b128 + 31*m.b38*m.b131 + 32*m.b38*m.b134 + 33* m.b38*m.b137 + 34*m.b38*...
RDF() editor = rdf.to_editor("<insert xml here>") energy_diff = editor.new_energy_diff() energy_diff \ .about("reaction0000", eUriType.MODEL_URI) \ .has_property(is_version_of="OPB:OPB_00237") \ .add_source("species0000", eUriType.MODEL_URI, 1) \ .add_sink("species0001", eUriType.MODEL_URI, 1) editor.ad...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
import numpy as np import random import math import time from collections import Counter class StringKernel(): def __init__(self): pass @staticmethod def compute_kernel_two_strings(string1, string2, ngram_range_min, ngram_range_max, clusters=None): pass @staticmethod def compute_kernel_string_listofstrings(s...
<gh_stars>0 import ply.lex as lex import ply.yacc as yacc import sys from typeValidation import validType, isBool from exec import execute NUM_TEMP_VARIABLES = 50 quadruplets = [] quadrupletIndex = 1 operandsStack = [] operatorsStack = [] typesStack = [] jumpsStack = [] ifsStack = [] dosStack = [] exitsStack = [] rea...
<filename>FwXG/sophoslib.py #!/usr/bin/env python """ Introduction: Library to control a Sophos Firewall XG via API. The idea here is construct a HTTP GET in XML form-based as mentioned on API Sophos link: https://docs.sophos.com/nsg/sophos-firewall/18.0/API/index.html Usage: Declare user, pass and IP to c...
node selection base on in/out degree. Args: filter_name (str): Name for new filter. criterion (list): A two-element vector of numbers, example: [1,5]. predicate (str): BETWEEN (default) or IS_NOT_BETWEEN edgeType (str): Type of edges to consider in degree count: ANY (default), UNDIRECTED, INCOMING, OUTGOING, DIRE...
<reponame>adamrfox/rbk_nas_report #!/usr/bin/python from __future__ import print_function import rubrik_cdm import sys import os import getopt import getpass import urllib3 urllib3.disable_warnings() import datetime import pytz import time import threading try: import queue except ImportError: import Queue as queu...
<reponame>legnaleurc/wcpan.telegram import json from typing import List, Awaitable, Union from tornado import httpclient as thc, web as tw, httputil as thu from . import types, util _API_TEMPLATE = 'https://api.telegram.org/bot{api_token}/{api_method}' ReplyMarkup = Union[ types.InlineKeyboardMarkup, types.Repl...
import math import torch from enum import Enum from torch import Tensor from typing import List, Tuple, Optional, Dict from . import functional as F, InterpolationMode __all__ = ["AutoAugmentPolicy", "AutoAugment", "RandAugment", "TrivialAugmentWide"] def _apply_op(img: Tensor, op_name: str, magnitude: float, int...
0x1FFFF), (0x2FFFE, 0x2FFFF), (0x3FFFE, 0x3FFFF), (0x4FFFE, 0x4FFFF), (0x5FFFE, 0x5FFFF), (0x6FFFE, 0x6FFFF), (0x7FFFE, 0x7FFFF), (0x8FFFE, 0x8FFFF), (0x9FFFE, 0x9FFFF), (0xAFFFE, 0xAFFFF), (0xBFFFE, 0xBFFFF), (0xCFFFE, 0xCFFFF), (0xDFFFE, 0xDFFFF), (0xEFFFE, 0xEFFFF), (0xFFFFE, 0xFFFFF), (0x10FFFE, 0x10FFFF)]) ...
None, env: Optional[pulumi.Input[Sequence[pulumi.Input['StorageClusterSpecStorkEnvArgs']]]] = None, image: Optional[pulumi.Input[str]] = None, lock_image: Optional[pulumi.Input[bool]] = None): """ Contains STORK related spec. :param pulumi.Input[Mapping[str, Any]] args: It is map of arguments given to STORK. Exam...
from datetime import datetime from corehq.apps.sms.models import (CallLog, INCOMING, OUTGOING, MessagingSubEvent, MessagingEvent) from corehq.apps.sms.mixin import VerifiedNumber, MobileBackend from corehq.apps.sms.util import strip_plus from corehq.apps.smsforms.app import start_session, _get_responses from corehq.ap...
''' ## Aliyun ROS FNF Construct Library This module is part of the AliCloud ROS Cloud Development Kit (ROS CDK) project. ```python import * as FNF from '@alicloud/ros-cdk-fnf'; ``` ''' import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions from ....
# TSYGANENKO module __init__.py """ ******************************* MODULE: tsyganenko ******************************* This modules containes the following object(s): tsygTrace: Wraps fortran subroutines in one convenient class This module contains the following module(s): tsygFort: Fortran subroutines Written...
= self.assertRaises(dispatcher.ExpectedException, self.man.create_stack, ctx_no_pwd, stack_name, template, params, None, {}, None) self.assertEqual(ex.exc_info[0], exception.MissingCredentialError) self.assertEqual( 'Missing required credential: X-Auth-Key', six.text_type(ex.exc_info[1])) ex = self.assertRaise...
grep_next_subtree(main_clause_mp, 'VP') main_clause_vp = grep_next_subtree(main_clause_vp, 'VP') # do this twice because of how the german grammar is set up main_clause_vp = grep_next_subtree(main_clause_vp, '(IVP|TVP(Masc|Fem|Neut)?)') main_clause_v = grep_next_subtree(main_clause_vp, '(IV|TV)$') metadata.updat...
"y": default_x = stat self._add_axis_labels(ax, default_x, default_y) if "hue" in self.variables and legend: artist = partial(mpl.lines.Line2D, [], []) alpha = plot_kws.get("alpha", 1) self._add_legend( ax, artist, False, False, None, alpha, plot_kws, {}, ) def plot_rug(self, height, expand_margins, legend, ...
logic, but we can deal with this later if thisUser == 'None': thisUser = GUESTID user = int(thisUser) lp = Listeningpost(name=unicode('New LP'), userid = user, created = datetime.now(), modified = datetime.now() ) lpid = lp.id retStr="?extra_lpid=" + str(lpid) + "&userid=" + str(user) + "&status=own...
= len(self.samplesList[0]) if (isPreferedDataUsed == True): mean = preferedMean standardDeviation = preferedStandardDeviation else: mean = [] temporalRow = [] for column in range(0, numberOfColumns): temporalRow.append(0) mean.append(temporalRow) for row in range(0, numberOfSamples): for column in range(0, n...
""" SNMPv2_MIB The MIB module for SNMP entities. Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3418; see the RFC itself for full legal notices. """ from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YLis...
# $Id$ # This class is for processing query to map into concept # Task: # 1) Normalize text # 2) Map into UMLS concept import re from pyparsing import * class QueryNorm: ''' This class is for normalizing text ''' def __init__(self, text): self.data = text def __repr__(self): return "%s" % (self.data) def...
continue OooOo [ o0o0O00 ] = IIiO0Ooo . interface if 63 - 63: o0oOOo0O0Ooo * iIii1I11I1II1 * II111iiii . OoO0O00 - oO0o / OoOoOO00 if 78 - 78: i11iIiiIii / OoO0O00 / i1IIi . i11iIiiIii if ( OooOo == { } ) : lprint ( 'Suppress Info-Request, no "interface = <device>" RLOC ' + "found in any database-mappings" ) if 1...
83 RULE_compound_identifier = 84 RULE_literal = 85 RULE_err = 86 ruleNames = [ "parse", "query", "select_query", "select_query_main", "select_with_step", "select_select_step", "select_from_step", "select_array_join_step", "select_sample_step", "sample_ratio", "select_join_step", "select_join_right_part...
info.name.lower() == 'query_status': return info def _findinfos(self, votable): # this can be overridden to specialize for a particular DAL protocol infos = {} res = self._findresultsresource(votable) for info in res.infos: infos[info.name] = info.value for info in votable.infos: infos[info.name] = info.value...
weight = _get_weight_or_default(ifst._weight_factory, weight, map_type == MapType.TIMES_MAPPER) ofst = ifst._mutable_fst_type() ifst._ops.map(ifst, ofst, map_type, delta, weight) return ofst def compose(ifst1, ifst2, connect=True, compose_filter="auto"): """ Constructively composes two FSTs. This operation co...
# -*- coding: utf-8 -*- # $Id: wuihlpform.py $ """ Test Manager Web-UI - Form Helpers. """ __copyright__ = \ """ Copyright (C) 2012-2017 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/o...
import random import binascii class DES(object): # Initial permutation for subkey generation (IPC) __ipc = [ 56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 60, 52, 44, 36, 28, 20, 12, 4,...
as database name. :param pulumi.Input[str] state: The current state of the Database Home. :param pulumi.Input[str] tde_wallet_password: The optional password to open the TDE wallet. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numeric, and two special characters...
[] for i in range(13): for j in range(1, 13): for k in range(2, 13): for l in range(3, 13): for m in range(4, 13): if m == l + 1 and l == k + 1 and k == j + 1 and j == i + 1: STRAIGHT_SCSSD.append({S[i], C[j], S[k], S[l], D[m]}) STRAIGHT_SCSSD.append({S[9], C[10], S[11], S[12], D[0]}) STRAIGHT_SCSCS = [] for i i...
'short-hm': 'C2cb', 'is_reference': False}, ), 'C c 2 a' : ( (('C', 'italic'), ('c', 'italic'), ('2', 'regular'), ('a', 'italic'), ), {'itnumber': 41, 'crystal_system': 'orthorhombic', 'short-hm': 'Cc2a', 'is_reference': False}, ), 'A c 2 a' : ( (('A', 'italic'), ('c', 'italic'), ('2', 'regular'), ('a', 'i...
import warnings import numpy as np from joblib import Parallel, delayed from scipy.stats.distributions import chi2 from scipy.stats.stats import _contains_nan from sklearn.metrics import pairwise_distances from sklearn.metrics.pairwise import pairwise_kernels def contains_nan(a): # from scipy """Check if inputs con...
import os import sys import pickle import signal import argparse import traceback import torch import numpy as np import embedding.factory as ebd import classifier.factory as clf import dataset.loader as loader import train.factory as train_utils def parse_args(): parser = argparse.ArgumentParser( description="Fe...
m.x304 >= 1.48160454092422) m.c425 = Constraint(expr= m.x197 + m.x269 + m.x304 >= 0.832909122935104) m.c426 = Constraint(expr= m.x198 + m.x270 + m.x304 >= 1.16315080980568) m.c427 = Constraint(expr= m.x199 + m.x271 + m.x304 >= 1.64865862558738) m.c428 = Constraint(expr= m.x200 + m.x272 + m.x304 >= 0.916290731874155...
from __future__ import print_function """ :py:class:`UtilsCalib` ============================== Usage:: from Detector.UtilsCalib import proc_block, DarkProc, evaluate_limits from Detector.UtilsCalib import tstamps_run_and_now, tstamp_for_dataset gate_lo, gate_hi, arr_med, arr_abs_dev = proc_block(block, **kwa) l...
""" The value module. Stores attributes for the value instance and handles value-related methods. """ import logging import threading import warnings from ..connection import message_data from ..connection import seluxit_rpc from ..errors import wappsto_errors def isNaN(num): """Test if input is a float 'NaN' valu...
from PIL import Image from PyQt5 import QtCore, QtWidgets from PyQt5.QtGui import QPixmap from functools import partial from pdf2image import convert_from_path, pdfinfo_from_path from scripts.database_stuff import DB, sqlite from scripts.tricks import tech as t from scripts.widgets import DevLabel, PDFWidget from zipfi...
<reponame>kjdoore/spec_map_analysis def gauss_func(x, a0, a1, a2, a3=None, a4=None, a5=None): """ Defines a function that consists of a Gaussian with the optional addition of a polynomial up to degree 2. Parameters ---------- x : 1-D array_like The independent variable data, of length M, where the function is t...
en-ca)', 'Mozilla/4.0 (compatible; WebCapture 3.0; Macintosh)', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (FM Scene 4.6.1)', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) (Prevx 3.0.5) ', 'Mozilla/5.0 (X11...
-> Sequence[str]: """ A list of pool IDs in failover priority to use for traffic reaching the given PoP. """ return pulumi.get(self, "pool_ids") @property @pulumi.getter def region(self) -> str: """ A region code which must be in the list defined [here](https://support.cloudflare.com/hc/en-us/articles/1150005...
session or (username and password and dockey): out("LOGIN ATTEMPT", "2") sheet = '' if (username and password and dockey): gsp = gspread.login(username, password) gdoc = gsp.open_by_key(dockey) else: if 'oa2' in session: creds = Credentials(access_token=session['oa2']) out("Credential object created.") else: ...
book_stock.groupby(['time_id']).apply(other_metrics).to_frame().reset_index().fillna(0) df_others = df_others.rename(columns={0:'embedding'}) df_others[['linearFit1_1','linearFit1_2','linearFit1_3','wap_std1_1','wap_std1_2','wap_std1_3']] = pd.DataFrame(df_others.embedding.tolist(), index=df_others.index) df_others[...
<filename>update_leds.py<gh_stars>1-10 #!/usr/bin/python3 """ # update_leds.py # Moved all of the airport specific data / metar analysis functions to update_airport.py # This module creates a class updateLEDs that is specifically focused around # managing a string of LEDs. # # All of the functions to initialise, manipu...