input
stringlengths
2.65k
237k
output
stringclasses
1 value
from django.shortcuts import render, redirect from django.http import JsonResponse from django.conf import settings from django.contrib.auth import authenticate, login from django.core.mail import send_mail import json from .models import * from .forms import * from django.http import HttpResponseRedirect,HttpResponse ...
data def get_land_sea_mask(self): if self.resolution == 1000: satellite_type1 = ['FY3A', 'FY3B'] satellite_type2 = ['FY3C'] if self.satellite in satellite_type1: data_file = self.in_file if not os.path.isfile(data_file): raise ValueError( 'Data file is not exist. {}'.format(data_file)) with h5py.File(data_f...
from __future__ import print_function, absolute_import import os, sys, subprocess, shlex, tempfile, time, sklearn.base, math import numpy as np import pandas as pd from pandas_extensions import * _vw_default_path = 'utils/lib/vw' class _VW(sklearn.base.BaseEstimator): def __init__(self, logger=None, ...
BOLD DIGIT SIX 1D7D5 MATHEMATICAL BOLD DIGIT SEVEN 1D7D6 MATHEMATICAL BOLD DIGIT EIGHT 1D7D7 MATHEMATICAL BOLD DIGIT NINE 1D7D8 MATHEMATICAL DOUBLE-STRUCK DIGIT ZERO 1D7D9 MATHEMATICAL DOUBLE-STRUCK DIGIT ONE 1D7DA MATHEMATICAL DOUBLE-STRUCK DIGIT TWO 1D7DB MATHEMATICAL DOUBLE-STRUCK DIGIT THREE 1D7DC MATHEMATICAL DOUB...
# # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Copyright (C) 2018-2021 UAVCAN Development Team <uavcan.org> # This software is distributed under the terms of the MIT License. # import datetime import inspect import logging import types import typing import nunavut.lang from ..templates ...
#!/usr/bin/env python # Copyright (c) 2015: # Istituto Nazionale di Fisica Nucleare (INFN), Italy # # See http://www.infn.it for details on the copyrigh holder # # 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 o...
from .core import KeyStore, KeyStoreError, PinError from platform import CriticalErrorWipeImmediately import platform from rng import get_random_bytes import hashlib import hmac from bitcoin import ec, bip39, bip32 from bitcoin.transaction import SIGHASH from helpers import aead_encrypt, aead_decrypt, tagged_hash impor...
<filename>data/external/repositories_2to3/154929/march-ml-mania-2015-master/src/hardcoded.py # this was produced by calling kaggle_to_collected(2011) and then manually fixing it by looking at # http://en.wikipedia.org/wiki/List_of_colloquial_names_for_universities_and_colleges_in_the_United_States # For schools for w...
# Ultroid - UserBot # Copyright (C) 2020 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>. """ ✘ Commands Available - • `{i}gban <reply user/ username>` • `{i}ungb...
"modifiedTime": suggest = "modified_time" elif key == "azureDataLakeSection": suggest = "azure_data_lake_section" elif key == "azureMySqlSection": suggest = "azure_my_sql_section" elif key == "azurePostgreSqlSection": suggest = "azure_postgre_sql_section" elif key == "azureSqlDatabaseSection": suggest = "azure...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= ## @file ostap/fitting/dataset.py # Module with decoration for RooAbsData and related RooFit classes # @see RooAbsData # @see RooDataSet # @author <NAME> <EMAIL> # @date 2011-06-07 # =========...
inferred from the general limits/nominal values (e.g. i) """ I_SD_IDX = 0 I_SQ_IDX = 1 EPSILON_IDX = 2 CURRENTS_IDX = [0, 1] CURRENTS = ['i_sd', 'i_sq'] VOLTAGES = ['u_sd', 'u_sq'] _model_constants = None _initializer = None def __init__(self, motor_parameter=None, nominal_values=None, lim...
# Copyright (c) 2015 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the S...
import torch import re import os import collections from torch._six import string_classes, int_classes import cv2 from opt import opt from tqdm import tqdm import time import matplotlib.pyplot as plt from PIL import Image import numpy as np import math import copy from put_gif import put_gif import stati...
# Copyright 2022 The TensorFlow Authors. 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 ...
pandas series and got {0}'.\ format(type(data))) if user_col not in data or pd.isnull(data[user_col]): raise ValueError('Missing required username') if (hpc_user_col not in data or pd.isnull(data[hpc_user_col])) and \ (password_col not in data or pd.isnull(data[password_col])): raise ValueError('Missin...
- **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination. - **PageSize** *(integer) --* The size of each page. - **StartingToken** ...
#!/usr/bin/env python3 import sys import os import os.path import subprocess import tempfile import re import itertools import hashlib import shutil import argparse import codecs import json import multiprocessing from functools import partial backend = 'glsl' args = {} def remove_file(path): #print('Removing file:...
'.6e'), '# cluPh1322'], [1280, format(angle(scaled_wc('lu_1332')), '.6e'), '# cluPh1332'], [1281, format(angle(scaled_wc('lu_1323')), '.6e'), '# cluPh1323'], [1282, format(angle(scaled_wc('lu_1333')), '.6e'), '# cluPh1333'], [1283, format(angle(scaled_wc('lu_2213')), '.6e'), '# cluPh2213'], [1284, format(angle(sca...
for path: ['S', 'W', 'W', 'W', 'S', 'E', 'E', 'S', 'E', 'S', 'W', 'W', 'W', 'S', 'S', 'E'] # D4 E1 E4 F1 G1 I4 J4 # Score 6 for path: ['E', 'S', 'E', 'S', 'S', 'W', 'W', 'W', 'W', 'W', 'N', 'E', 'N', 'W', 'N', 'E'] # D2 D4 D7 E7 F5 H7 # Score 6 for path: ['E', 'S', 'W', 'W', 'W', 'S', 'S', 'E', 'E', 'S', 'W', 'W', 'W',...
+ database._cacheDB['ftpd'][i]._sub_id + "\", " particle = particle + "\"super_id\" : \"" + database._cacheDB['ftpd'][i]._super_id + "\"}, " particles = particles + particle particles = particles[0:(len(particles)-2)] result = "{ \"retrunValue\" : \"True\", \"data\" : " + particles +" } }" # # # if (command[1]...
* defaultReverseAcceleration, 'maxReverseSpeed': 0.69999999999999996 * defaultMaxReverseAcceleration, 'turn': 0.59999999999999998 * defaultTurn, 'maxTurn': 0.59999999999999998 * defaultMaxTurn }, NAVY_DREADNOUGHT: { 'setShipClass': NAVY_DREADNOUGHT, 'modelClass': WARSHIPL3, 'defaultStyle': Styles.Navy, 'mastCon...
<reponame>ratschlab/spladder<gh_stars>10-100 import numpy as np import statsmodels.api as sm import statsmodels.sandbox as sms import h5py import sys import os import pdb import pickle import warnings import time import datetime from scipy.optimize import minimize_scalar from scipy.special import polygamma from scipy.s...
:param data_list: list of dicts with keys `xml_id` (XMLID to assign), `noupdate` (flag on XMLID), `values` (field values) :param update: should be ``True`` when upgrading a module :return: the records corresponding to ``data_list`` """ original_self = self.browse() # records created during installation should no...
"Ankor Wat: Map 186 to Map 183"], 586: [587, 0, 0, 379, 381, "", b"", False, True, False, "Ankor Wat: Map 186 to Map 187 (W)"], 587: [586, 0, 0, 0, 0, "", b"", False, True, False, "Ankor Wat: Map 187 to Map 186 (W)"], 588: [589, 0, 0, 381, 380, "", b"", False, True, False, "Ankor Wat: Map 187 to Map 186 (E)"], 589:...
OUTbound from the newly-created node. Note: this is a simpler version of create_node_with_relationships() EXAMPLE: create_node_with_children( labels="PERSON", properties={"name": "Julian", "city": "Berkeley"}, children_list=[ (123, "EMPLOYS") , (456, "OWNS") ] ) :param labels: Labels to assign to the newly-c...
match_expressions is not None: pulumi.set(__self__, "match_expressions", match_expressions) if match_labels is not None: pulumi.set(__self__, "match_labels", match_labels) @property @pulumi.getter(name="matchExpressions") def match_expressions(self) -> Optional[Sequence['outputs.NoSQLInstanceSpecClassSelectorMat...
ret = vmdk_ops.disk_attach(vmdk_path=fullpath, vm=vm[0]) self.assertTrue("Error" in ret) # detach all the attached disks for id in range(1, self.max_vol_count + 1): volName = 'VmdkAttachDetachTestVol' + str(id) fullpath = os.path.join(self.datastore_path, volName + '.vmdk') ret = vmdk_ops.disk_detach(vmdk_path=fu...
def metadata(self): return self.ll_table.metadata @property def metadata_offset(self): return self.ll_table.metadata_offset def add_row(self, metadata=None): """ Adds a new row to this :class:`PopulationTable` and returns the ID of the corresponding population. :param bytes metadata: The binary-encoded meta...
0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.442343, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic':...
npy_int32 const [] Bp, npy_int32 const [] Bi, unsigned short const [] Bx, npy_int32 [] Cp, npy_int32 [] Ci, unsigned short [] Cx) csc_eldiv_csc(npy_int32 const n_row, npy_int32 const n_col, npy_int32 const [] Ap, npy_int32 const [] Ai, int const [] Ax, npy_int32 const [] Bp, npy_int32 const [] Bi, int const [] Bx,...
from typing import Union class Profile(): """This class contains all API endpoints for the Profile category of the Retail World of Warcraft API :param api: An instance of our generic API object :type api: API """ def __init__(self, api): """Constructor method """ self.api = api async def getProfileApiReso...
directory') dump.add_lines(self.DIRECTORY_ENTRY_RESOURCE.struct.dump()) for resource_type in self.DIRECTORY_ENTRY_RESOURCE.entries: if resource_type.name is not None: # name = str(resource_type.name) #.string if resource_type.name.string else '' dump.add_line(u'Name: [{0}]'.format( resource_type.name.decode(en...
<reponame>vincenttran-msft/azure-sdk-for-python # 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. #----------------------...
formats from self.formats to be used for this column date_formats_used[j] = list(subformats) random_idxs = np.array_split(rng.choice(nrow, size=nrow, replace=False), len(subformats)) #randomly split dataframe indices into len(subformats) number of groups for i in range(len(subformats)): #for each group of indic...
from utils.vocab import Vocab from utils.util import initialize_weights, set_seed, count_parameters, save_params, build_vocab import utils.constants as constants from utils.loss import LabelSmoothing, LossCompute from utils.optimizer import NoamOpt from Dataloader import ParallelDataset, get_dataloader from Translate...
ONTAP 8.2 or later operating in Cluster-Mode if the relationship control plane is 'v1'. </ul> :param destination_snapshot: Creates the specified snapshot (in addition to the regular SnapMirror snapshot) on the destination after the qtree SnapMirror transfer is over. :param transfer_priority: Specifies the pr...
def view_diff_working_copy(self, data=None): return (self.vcs.is_in_a_or_a_working_copy(self.path) and len(self.revisions) == 1) def copy_clipboard(self, data=None): return (len(self.revisions) > 0) def view_diff_previous_revision(self, data=None): item = self.revisions[0]["revision"] return ("previous_revision...
""" Sentence Pair Classification with Bidirectional Encoder Representations from Transformers ========================================================================================= This example shows how to implement finetune a model with pre-trained BERT parameters for sentence pair classification, with Gluon NLP...
#!/usr/bin/env python # Copyright (c) Microsoft Corporation # All rights reserved. # # MIT 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 without limi...
<reponame>NextThought/nti.schema #!/usr/bin/env python # -*- coding: utf-8 -*- """ For producing a JSON schema appropriate for use by clients, based on a Zope schema. The ``TAG`` constants are intended to be set as (boolean) tagged values on fields of interfaces, helping determine how the schema is built. .. note:: T...
reqd_string_in_label, nsamples_per_condition, label_value_counts, srs_subset, all_indexes_to_use, all_samples_to_use, labels_to_use, counts_to_use, conditions_list], os.path.join(data_directory, 'datasets', dataset_name), dataset_name+'.pkl') # Write all the data for input into DESeq2, instead of just a sample def wr...
returned, i.e., the points where there isn't complete overlap between kernel and spike train are discarded NOTE: if True and an asymmetrical kernel is provided the output will not be aligned with [t_start, t_stop] Returns ------- rate : neo.AnalogSignal Contains the rate estimation in unit hertz (Hz). Has a p...
0, 1, 1], [0, 1, 1, 1], [0, 1, 0, 0]], dtype=np.uint8) base_img1_flipped = np.array([[1, 1, 0, 0], [1, 1, 0, 0], [1, 1, 1, 0]], dtype=np.uint8) base_img2_flipped = np.array([[1, 1, 0, 0], [1, 1, 1, 0], [0, 0, 1, 0]], dtype=np.uint8) images = np.array([base_img1, base_img2]) images_flipped = np.array([base_i...
import sys from io import StringIO from PySide6.QtCore import * from PySide6.QtGui import * from PySide6.QtWidgets import * from modules.settings.settings import SettingsManager from modules.pseudo_id.pseudo_id import PseudoIDManager from gms_uploader.modules.models.pandasmodel import PandasModel from gms_uploader.mo...
import argparse import itertools import json import logging import os import pickle import time import warnings from collections import Counter, defaultdict from typing import Dict, Any, List, Iterable, Tuple, Set warnings.filterwarnings(action='ignore', category=UserWarning, module='gensim') import langdetect import...
easier and less verbose! These options are meant to be used in conjunction with a config file for overriding certain configuration options and testing them. """), formatter_class=argparse.RawDescriptionHelpFormatter) add_list_args(plot_parser, True) add_dump_args(plot_parser, True) add_plot_args(plot_parser, Fa...
the redundancy of the filters (the larger r_psi, the larger the overlap between adjacent wavelets), and stability against time-warp deformations (larger r_psi improves it). Defaults to sqrt(0.5). Tuple sets separately for first- and second-order filters. criterion_amplitude : float, optional Represents the numeri...
<reponame>AvinashSingh786/W2RC import tkinter from tkinter import messagebox import tkinter.filedialog as fd import signal import subprocess import hashlib import os import sys import ctypes import winreg import psutil import datetime import pickle import logging import datetime as dt import json import requests impor...
<reponame>LuisPalacios/iptv2hts # Stardard tools import struct import re import sys import os import itertools import logging import json # Networking import socket from errno import EAGAIN # Time handling import time import pytz import datetime from datetime import timedelta # XML import urllib import xml.etree.Ele...
cluster. :rtype: dict :returns: """ pass def batch_modify_cluster_snapshots(self, SnapshotIdentifierList: List, ManualSnapshotRetentionPeriod: int = None, Force: bool = None) -> Dict: """ Modifies the settings for a list of snapshots. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/re...
import functools import warnings from pathlib import Path import numpy as np import pandas as pd from estimagic import batch_evaluators as be from estimagic.config import CRITERION_PENALTY_CONSTANT from estimagic.config import CRITERION_PENALTY_SLOPE from estimagic.logging.database_utilities import append_row from est...
# -*- coding: utf-8 -*- ###################################################### # PROJECT : Anuvaad PDF Paragraph Parser # AUTHOR : <NAME> # DATE : Apr 27, 2020 ###################################################### import ast import cv2 import io import numpy import os import re import pyspark.sql.functions as F im...
** 2 # 2) vx/vy = dx/dy vy = sqrt(1600 / (1 + dx**2/dy**2)) if dy != 0 else 0 vx = sqrt(1600 / (1 + dy**2/dx**2)) if dx != 0 else 0 self.owner.spawner.spawn('tall_spark', (2 + 2*dx_sign, 7 + 2*dy_sign), vx=vx * dx_sign, vy=vy * dy_sign, **kwargs) self.dispatcher.add_event(BearEvent('play_sound', 'spark')) d...
superfreq, superf / superfreq ) + superblob ) else: superblob = ( "\n{} 0 N/A\n".format(supercat.capitalize()) + superblob ) totalfreq += superfreq totalf += superf # TODO is this correct? bprint("".join(superblob)) bprint("Total frequency: {}".format(totalfreq)) bprint("Total F-score: {}".format(totalf / t...
ans = float(S - ans) / S return A def func_8ac373f0b58c4f80a2a6c5b1152ffbf0(r, s, q, N): D = [((i * p + q) % r + s) for i in range(N)] S = sum(D) ans = S A, B, C = 0, 0, S a = 0 b = -1 while b < N - 1: b += 1 C -= D[b] B += D[b] p = max(A, B, C) while a < b: B -= D[a] A += D[a] a += 1 t = max(A, B, C...
import torch from torch import nn from torch.nn import functional as F from torch.nn import init from torch.autograd import Function from math import sqrt import torch.utils.data import torch.utils.data.distributed from torch.nn.utils import spectral_norm F_conv = torch.nn.functional.conv2d ''' fix the last four layer...
nerc region matches the nerc region of operation (TRUE) df['nerc_match'] = df['nerc_region'] == df['nerc_regions_of_operation'] # Group by utility, state, and report date to see which groups have at least one TRUE value grouped_nerc_match_bools = ( df.groupby(['utility_id_eia', 'state', 'report_date']) [['nerc_ma...
dparam in pdC] else: # Don't kill gradients dC = pdC # Set class attributes and return self.C, self.dC, self.L = C, dC, L return C, dC, L # Method to get updates def getupdates(self, cost=None, gradients=None, method='sgd', **kwargs): """ :type cost: theano.tensor.var.TensorVariable :param cost: Cost scala...
<reponame>WindRiver-Labs/wrlinux<filename>wrlinux-ovp/recipes-extended/system-report/files/systemReporter.py #!/usr/bin/env python ############################################################################### # # Copyright (C) 2013 Wind River Systems, Inc. # # This code is licensed under the GPLv2. # ################...
0 #sometimes the HTTPS connection gets rejected/terminated except requests.exceptions.ConnectionError: logger.warning(f'GQ >>> Connection error encountered for {product_id}.') return 0 except: logger.critical('GQ >>> Processing has failed!') #uncomment for debugging purposes only #logger.error(traceback.for...
# Copyright 2016 Brocade Communications System, 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 require...
<gh_stars>0 import copy import numpy as np import os import random import sys import time import warnings from contextlib import redirect_stdout import ipdb with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=FutureWarning) # To deactivate warnings: https://github.com/tensorflow/tensorflow/issu...
The identity provider input for data plane authentication. :type data_plane_authentication_identity_input: ~azure.mgmt.recoveryservicessiterecovery.models.IdentityProviderInput """ _validation = { 'machine_name': {'required': True}, 'authentication_identity_input': {'required': True}, 'resource_access_identity...
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
# The piwheels project # Copyright (c) 2017 <NAME> <https://github.com/bennuttall> # Copyright (c) 2017 <NAME> <<EMAIL>> # # 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 t...
to `1000`") # noqa: E501 collection_formats = {} path_params = {} if 'list_id' in params: path_params['list_id'] = params['list_id'] # noqa: E501 query_params = [] if 'fields' in params: query_params.append(('fields', params['fields'])) # noqa: E501 collection_formats['fields'] = 'csv' # noqa: E501 if 'exclu...
of optical depth grid self.L = self.M = len(self.x) self.ll = self.mm = np.arange(self.L) self.logE = np.log10(self.E) self.n0 = min(self.nn) self.dE = np.diff(self.E) self.dlogE = np.diff(self.logE) # Pre-compute cross-sections self.sigma_E = np.array([np.array([self.sigma(E, i) for E in self.E]) \ for i i...
will rise or fall # Note: R = Rising, F = Falling #-------------------------------------------------- # wR = (self.dV > 0) # boolean array # wF = np.invert(wR) # boolean array # n_rising = wR.sum() # n_falling = wF.sum() # print(' n_rising = ' + str(n_rising)) # print(' n_falling = ' + str(n_falling)) #-...
<filename>varCall_filtering/scripts/helpers.py<gh_stars>1-10 import ConfigParser import os import re import sys import subprocess from threading import Thread def mpileup_cmdgen(args,case_name,source_dir): #generate command for mpileup cmd = "qsub -sync y -t " + str(args.start) + "-" + str(args.end) \ + " -V " \ +...
# -*- coding: utf-8 -*- """ Workflow and workflow proxy base class definitions. """ __all__ = ["BaseWorkflow", "workflow_property", "cached_workflow_property"] import sys import functools import logging from collections import OrderedDict from abc import abstractmethod import luigi import six from law.task.base ...
#!/usr/bin/env python # # BEDOPS # Copyright (C) 2011-2017 <NAME>, <NAME> and <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) any...
<reponame>Cloudxtreme/tmux-cssh-gui #!/usr/bin/env python import gtk import gtk.glade import subprocess import shlex from service import environment from model.setting import Setting from service.settings import Settings from service.config import Config from gui.entrydlg import EntryDlg class TMUXCSSHGUI: # Cons...
0) # Offsets for start and end of k loop. # Prevents mapping of space beyond the grid. k1start = 0 k1end = 0 k2start = 0 k2end = 0 for d in xrange(max_d): # Bail out if deadline is reached. if time.time() > deadline: break # Walk the front path one step. for k1 in xrange(-d + k1start, d + 1 - k1end, 2): k...
in self.cif.keys(): cifpat = self.cif[pattern] if ( x_ordinate not in cifpat or y_ordinate not in cifpat and y_ordinate != "Pattern number" or z_ordinate not in cifpat ): continue # we now know that both x and z are in the pattern x = cifpat[x_ordinate] z = cifpat[z_ordinate] y = i if y_ordinate == "Pattern...
import unittest from myunittest_settings import * import os,sys,inspect current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parent_dir = os.path.dirname(current_dir) sys.path.insert(0, parent_dir) from find_dups import * class TestUM(unittest.TestCase): def setUp(self): pass ...
tbi_ids, write_to_outstore = True) output_gvcf_id = concat_job.rv(0) output_gvcf_index_id = concat_job.rv(1) elif options.caller == 'dragen': dragen_job = merge_chr_bams_job.addChildJobFn(run_dragen_gvcf, context, sample_name, merge_chr_bams_job.rv(0), dragen_ref_index_name, udp_data_dir, helix_username, write_to_o...
# E[d][31:0] e_d_1 = self.get("d{0}".format(self.data['d']+1), Type.int_32) # E[d][62:32] result_w0 = e_d_0 - mul_res0 result_w1 = e_d_1 + mul_res1 # compute ssov32 max_pos = self.constant(INT32_MAX_POS, Type.int_32) max_neg = self.constant(INT32_MAX_NEG, Type.int_32) result_w0_ssov = ssov32(result_w0, max_pos,...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2004-2021 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
__nutils_hash__(self): h = hashlib.sha1('{}.{}:{}\0'.format(type(self).__module__, type(self).__qualname__, type(self)._version).encode()) for arg in self._args: h.update(nutils_hash(arg)) for name in sorted(self._kwargs): h.update(nutils_hash(name)) h.update(nutils_hash(self._kwargs[name])) return h.digest() ...
<gh_stars>0 # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you m...
*, duration: pulumi.Input[int], filename: pulumi.Input[str], filter: Optional[pulumi.Input[str]] = None): """ :param pulumi.Input[int] duration: Time frame in seconds of the capture. :param pulumi.Input[str] filename: Defines the name of the capture file. :param pulumi.Input[str] filter: Additional filter to app...
<gh_stars>1-10 """Main entry file, definition of ColumnDT and DataTables.""" import sys from collections import namedtuple from logging import getLogger from dateutil.parser import parse as date_parse import datetime from sqlalchemy.dialects import postgresql, mysql, sqlite from sqlalchemy import func, Text, or_ import...
<filename>cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_asr9k_lc_ethctrl_oper.py import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from...
zeff, zorig, rel, nr, r, r2, dl, q0, xm1, xm2, njrc, vi): '''setqmm subroutine''' c = 137.038 alpha = rel / c aa = alpha * alpha a2 = aa / 2. lp = l + 1 lpx = lp if lp > 4: lpx = 4 lp2 = l + l + 1 if lp2 > 7: lp2 = 7 zeff = zorig if njrc[lpx] > 0: zeff = 0. zaa = zeff * aa za2 = zeff * a2 if idof...
<reponame>wawzat/pa-get-data<gh_stars>1-10 # Get PurpleAir sensor data from PurpleAir and Thingspeak API's for year-month and store as csv files # similar to downloaded CSV's from PurpleAir map list. # Rename config_template py to config.py and edit to include PurpleAir keys, directory path and bounding box variables. ...
<gh_stars>1-10 # replicas.models # Database models for the replicas app. # # Author: <NAME> <<EMAIL>> # Created: Wed Jun 06 22:20:21 2018 -0400 # # ID: models.py [] <EMAIL> $ """ Database models for the replicas app. """ ########################################################################## ## Imports ###########...
<reponame>hrnciar/klusta # -*- coding: utf-8 -*- """SpikeDetekt algorithm.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ from collections import defaultdict import logging import numpy as n...
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2007, 2008 <NAME> <<EMAIL>> # # This file is part of the Bobcat program. # # Bobcat is free software; you can use it, redistribute it and/or modify it # under the terms of the MIT license. # # You should have received a copy of the MIT license wi...
""" Calculate the cost basis. """ import csv import decimal import io from decimal import Decimal from typing import Sequence from yabc import coinpool from yabc import ohlcprovider from yabc import transaction from yabc.costbasisreport import CostBasisReport from yabc.transaction import Transaction from yabc.transact...
import numpy as np from scipy.ndimage import imread from scipy.misc import imsave from itertools import izip from collections import deque from pylibs.spatialfunclib import projection_onto_line import sqlite3 import math import sys import os import pickle # globals min_lat, min_lon, max_lat, max_lon = None, None, None...
""" drivers for conformer """ import numpy from qcelemental import constants as qcc import automol import elstruct import autofile import moldr from automol.convert import _pyx2z WAVEN2KCAL = qcc.conversion_factor('wavenumber', 'kcal/mol') EH2KCAL = qcc.conversion_factor('hartree', 'kcal/mol') def conformer_sampling...
return jnp.where(self.concentration <= 1, jnp.inf, a) @property def variance(self): # var is inf for alpha <= 2 a = (self.rate / (self.concentration - 1)) ** 2 / (self.concentration - 2) return jnp.where(self.concentration <= 2, jnp.inf, a) def tree_flatten(self): return super(TransformedDistribution, self).tr...
import re from datetime import datetime from aiohttp import web from sqlalchemy.sql import func, or_ from sqlalchemy.orm import aliased from ..app import app, logger from ..model.build import Build, BUILD_STATES, DATETIME_FORMAT from ..model.sourcerepository import SourceRepository from ..model.project import Project...
in this segment, in the order [11, 3, 6, 4, 9]. The segment can be read has having length 4 because four consecutive pitch classes, [3, 6, 4, 9], can be read from this sequence in such a way that the first pitch class of this subsequence is part of the first chord in the segment, and the last pitch class is that ...
""" The ID of the function associated with the trigger. """ return pulumi.get(self, "function_id") @function_id.setter def function_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "function_id", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ The name of th...
<gh_stars>1-10 """ # hdl21 Elaboration Defines the primary `elaborate` method used to flesh out an in-memory `Module` or `Generator`. Internally defines and uses a number of hierarchical visitor-classes which traverse the hardware hierarchy, performing one or more transformation-passes. """ # Std-Lib Imports impo...
# # amber_test_generation.py # Author: <NAME> # import sys import re from configuration import Configuration # Configuration object to be used in the Amber test generation # Notes: saturation_level describes the heuristic of running many # instances of the same test in the same kernel. Each instance of the # test op...
= x.index_select(axis, x_index) self.assertEqual( y, np.take(data.reshape(flatten_shape), index, axis=axes[0])) def test_isfinite(self): data = np.array([0., float('nan'), float('inf')]) x = new_tensor(data) self.assertEqual(x.isfinite(), np.isfinite(data)) def test_isinf(self): data = np.array([0., 1., float...
' + str(nts.shape) + '}' for nts_id_name, nts in _f.outputs.items()])) if f_name not in nodes: nodes[f_name] = (node_x, node_y, node_text) for label_to, (label_from, node_from) in _f.inputs.items(): to_x, to_y = ind.node2X[_f.id_name], n2d[_f.id_name] from_x, from_y = ind.node2X[node_from], n2d[node_from] inter...