input
stringlengths
2.65k
237k
output
stringclasses
1 value
} ), 'end' : has_entries( { 'line_num': 48, 'column_num': 4 } ), } ), } ), has_entries( { 'replacement_text': equal_to( '~' ), 'range': has_entries( { 'start': has_entries( { 'line_num': 48, 'column_num': 9 } ), 'end' : has_entries( { 'line_num': 48, 'column_num': 9 } ), } ), } ), ), 'location': has_entries...
v in sorted(self._tmp_sub_param_dict.items(), key=lambda knv: -knv[1].depth)} # save this sub-graph in the param dict self._param_dict[dict_key] = self._tmp_sub_param_dict # function for storing function heights def store_fn_heights(fn): if hasattr(fn, 'tree_height'): return fn.tree_height heights_in = [store_...
#!/usr/bin/python # # Copyright 2018 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 agreed ...
of data, whether it is train, test or val data_raw: Raw tracks from the dataset model_opts: Model options for generating data Returns: A dictionary containing, data, data parameters used for model generation, effective dimension of data (the number of rgb images to be used calculated accorfing to the length of op...
<filename>fronts/D.py # -*- coding: utf-8 -*- """D functions.""" from __future__ import division, absolute_import, print_function import six import functools import numpy as np import sympy def constant(D0): r""" Return a constant `D` function. Given :math:`D_0`, returns the function `D`: .. math:: D(\theta...
for the given stackfrom the given imagecatalog name Provides an interface to determine available Virtual Machine images for the given stack.Please consider running sync beforehand This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be...
partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified. :param pulumi.Input[str] type: Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. Expected value is 'Microsoft.Storage/Doc...
<filename>scripts/analyse_qmla.py import numpy as np import argparse from matplotlib.lines import Line2D import sys import os import pickle import matplotlib.pyplot as plt import pandas import warnings plt.switch_backend('agg') sys.path.append( os.path.abspath( os.path.join(os.path.dirname( __file__ ), '..') ) ) im...
from sqlalchemy import Column, Integer, Float, String, DateTime, Boolean, ForeignKey, create_engine, Table from sqlalchemy.schema import UniqueConstraint from sqlalchemy.orm import sessionmaker, relationship from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.exc import NoResultFound from sqlalc...
Arm-like', 'Testate Amoebae', 'The Catalyst', 'The Cells', 'The Chemical', 'The Natural', 'The Offspring', 'Thermal Oxidizer', 'Trial Phase', 'Tumor Cell', 'Unicellular Organism', 'Vascular Plant', 'Vinyl Alcohol', 'Viral Eukaryogenesis', 'Visual Phototransduction', 'Vitrella Brassicaformis', 'Volvox Ca...
<gh_stars>0 # -*- coding: utf8 -*- from textdistance import damerau_levenshtein as dist from aiohttp import FormData, web, client_exceptions, ClientSession from asyncio import CancelledError, TimeoutError import aiohttp_jinja2 import jinja2 import random as rnd import ujson as json from Template import str_help...
if 15 - 15: i1IIi % II111iiii / II111iiii - I1ii11iIi11i - I11i % i1IIi def print_info ( self ) : if ( self . info_reply ) : OoO = "Info-Reply" oOOoo0O00 = ( ", ms-port: {}, etr-port: {}, global-rloc: {}, " + "ms-rloc: {}, private-rloc: {}, RTR-list: " ) . format ( self . ms_port , self . etr_port , # iII111i + Oo...
args=(project.project_name,))) if 'submit' in request.POST: form = CreatePipeline(request.POST) if form.is_valid(): names = [] orders =[] pipelines = Pipeline.objects.filter(project=project) for pipeline in pipelines: names.append(pipeline.pipeline_name) orders.append(pipeline.pipeline_order) if form.cleaned_...
<filename>regresser.py import networkx as nx from krrt.planning.strips import progress_state, regress_state, is_applicable from krrt.planning.strips.representation import Action from linearizer import linearize from pop import TemporalConstraint def build_regression_list(pop): assert pop.init is not None assert...
<filename>Biological_Study/Plots_For_Enrichment_Jaccard_Mean_Level.py ############################################ # Script to make the plots for the article # ############################################ # Description ''' This script contains all the fucntions to generate the plots of the enrichment analyses includ...
starred_stories = MStarredStory.objects( user_id=user.pk, story_feed_id__in=found_feed_ids ).only('story_hash', 'starred_date') starred_stories = dict([(story.story_hash, dict(starred_date=story.starred_date, user_tags=story.user_tags)) for story in starred_stories]) else: starred_stories = {} # Intelligenc...
# coding: utf-8 import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import datetime from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import TimeSeriesSplit, cross_val_score from sklearn.metrics import roc_auc_score from hyperopt import fmin, hp, tpe,...
<filename>motion.py # GlowScript 2.6 VPython # ------------------------------------------------------------------------------ # Space (Scene) ---------------------------------------------------------------- simscene = canvas(title='(h = 60s) Three-Body Problem: Sun, Earth, Moon', width=1200, height=500, align="left",...
`SHA` with the reference you want to modify. - Modify the commit You need to get the index into the correct state you wish the commit to reflect. If you are changing the file contents, typically you would modify the working directory and use `git add` as normal. If you are changing the commit message only, you don't ...
return cdist(coords[p1], coords[p2]) def subdivide(network, pores, shape, labels=[]): r''' It trim the pores and replace them by cubic networks with the sent shape. Parameters ---------- network : OpenPNM Network Object pores : array_like The first group of pores to be replaced shape : array_like The shap...
global max_bmc, init_initial_f_name, initial_f_name, f_name,x, reachs, last_cex, last_winner, methods ## ps() ## print 'Output = %d'%j extract(j,j) ## ps() set_globals() if n_latches() == 0: result = check_sat() else: f_name = f_name + '_%d'%j print '^^^ f_name changed to %s'%f_name # make it so that jabc is no...
self._createWorkspace(taskName = "Named Entity", create = True, initialUsers = ["user1"]) w.importFiles([path], "core", file_type = "raw", encoding = 'big5') # Now, open the file in the workspace, and make sure the # string is the UTF-8 equivalent of the input, not the BIG5 equivalent. wsDoc = w.folders['core']...
from symengine import ( Symbol, sin, cos, sqrt, Add, Mul, function_symbol, Integer, log, E, symbols, I, Rational, EulerGamma, Function, Subs, Derivative, LambertW, zeta, dirichlet_eta, zoo, pi, KroneckerDelta, LeviCivita, erf, erfc, oo, lowergamma, uppergamma, exp, loggamma, beta, polygamma, digamma, trigamma, sign...
<filename>LAB2/pacard.py """ In search.py, you will implement generic search algorithms which are called by Pacman agents (in searchAgents.py). """ import util from logic import * class SearchProblem: """ This class outlines the structure of a search problem, but doesn't implement any of the methods (in object-or...
import os import copy from tqdm import tqdm import numpy as np import pandas as pd import plotly.graph_objects as go from stl import mesh from typing import Dict, List, Optional from .settings_pyskindose import PhantomDimensions from pyskindose.plotting.create_ploty_ijk_indices import \ _create_plotly_ijk_indices_fo...
<reponame>PhazonicRidley/Kurisu<filename>cogs/results/switch.py import re from .types import Module, ResultCode, UNKNOWN_MODULE, NO_RESULTS_FOUND """ This file contains all currently known Switch result and error codes. There may be inaccuracies here; we'll do our best to correct them when we find out more about them...
<reponame>mlund/scipp # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Scipp contributors (https://github.com/scipp) # @author <NAME> from __future__ import annotations from html import escape from typing import Optional import numpy as np from ._scipp import core as sc from . import config from .utils im...
<reponame>AkeBoss-tech/2DParkourAI import pygame import random import sys import os import neat import math pygame.init() clock = pygame.time.Clock() screenWidth = 800 screenHeight = 600 Score = 0 Frames = 0 Gen = 0 class platform(object): def __init__(self, x, y, height, width, position): self.x = x self.y = y...
<filename>CodeEntropy/FunctionCollection/EntropyFunctions.py from ast import arg import sys, os import numpy as nmp from CodeEntropy.ClassCollection import BeadClasses as BC from CodeEntropy.ClassCollection import ConformationEntity as CONF from CodeEntropy.ClassCollection import ModeClasses from CodeEntropy.ClassColl...
within {i: d} steps.", end=" ", flush=True) print(f"Stopping criterion: maximum number of iterations reached.", flush=True) print(f"Output written to: {self.outpath}", flush=True) elif mode == 4: print(f"Execution stopped. Output written to: {self.outpath}", flush=True) if mode > 0: walltime = datetime.now() - s...
in islice(valid_urls, FEW): a_f = download_file(a, cache=True) r.append((a, a_c, a_f)) assert set(cache_contents().keys()) == set(get_cached_urls()) for (u, c, h) in r: assert cache_contents()[u] == h @pytest.mark.parametrize('desired_size', [1_000_000_000_000_000_000, 1 * _u.Ebyte]) def test_free_space_checker...
import time import torchvision import cv2 import numpy as np from robot import * from image_folder2 import * from config import * from alset_ddqn import * import torch.nn.functional as F import time import torch import torch.optim as optim import torch.nn.functional as F import torchvision.datasets as datasets import t...
<gh_stars>0 # ------------------------------------------------------------------------------- # Copyright IBM Corp. 2018 # # 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.apach...
import pygame import random import time from src.event_manager import * from src.local_config import LocalConfig import src.model as model from src.models import story from src.models import society from src.models import button from src.models import input_box from src.models import island from src.models import code ...
retry requests. If ``None`` is specified, requests will be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. metadata (Optional[Sequence[Tuple[st...
gi_obj.attribute_col): return i return -1 def inv_pattern(self): """ Inverts all the variation symbols of all the gradual items (GIs) in the gradual pattern (GP) :return: inverted GP """ pattern = list() for gi in self.gradual_items: pattern.append(gi.inv().tolist()) return pattern def contains(self, gi):...
mac + '.ipxe' hdd_partition = '' if target_os == 'CYGWIN': hdd_partition = '(hd0,0)' elif target_os == 'Linux': hdd_partition = '(hd0,1)' elif target_os == 'FreeBSD': hdd_partition = '(hd0,2)' try: hdd_partition = config.TPCONF_os_partition[target_os] except AttributeError: pass if target_os == 'Linux': ...
# Copyright 2013 <NAME> # # 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 agreed to in writing, software ...
setting a new value if value is None: value = prop.get(self.PROP_VALUE) if value is not None: # Make sure the requested value is valid value = self._validate_value_for_property(prop, value) prop.set(self.PROP_VALUE, value) if label is not None: self.set_or_make_child(prop, self.PROPERTY_LABEL, label) if desc...
0.7: param10 = 1 elif dec < 0.3: param10 = 0.5 else: param10 = 0 else: if totalEmotion != 0: param10 = 1 else: param10 = 0 # How much experience do you have with football? X/O param2 = param2_generator(EventList, expList, ObjEntityList, EntityList, unsortedRelationList, vocab, vecs) retu...
<reponame>MetOffice/ocean_error_covs # (C) Crown Copyright, Met Office. All rights reserved. # # This file is part of ocean_error_covs and is released under the BSD 3-Clause license. # See LICENSE in the root of the repository for full licensing details. #################################################################...
from ryu.base import app_manager from ryu.controller import ofp_event from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER from ryu.controller.handler import set_ev_cls from ryu.ofproto import ofproto_v1_3 from ryu.ofproto import ether, inet from ryu.lib.packet import packet from ryu.lib.packet import ...
False ''' return True def _has_data(self): if not self.is_config(): return False if self.neighbor is not None: return True if self.pseudowire_id is not None: return True if self.pseudowire_static_mac_addresses is not None and self.pseudowire_static_mac_addresses._has_data(): return True if self.vfi_pw_cl...
<filename>humanlikehearing/dataset.py from .sound import Sound import PyPDF2 import librosa import numpy as np import os import pandas as pd import re import scipy import soundfile import warnings from collections import defaultdict class DataSet(object): """Class to access data in a unified way. A data set is st...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 9 17:02:59 2018 @author: bruce compared with version 1.6.4 the update is from correlation coefficient """ import pandas as pd import numpy as np from scipy import fftpack from scipy import signal import matplotlib.pyplot as plt from matplotlib.col...
<gh_stars>0 """Tests for the transform module.""" import numpy as np import random import unittest import os from lpot.data import TRANSFORMS, DATALOADERS from lpot.utils.create_obj_from_config import get_postprocess, create_dataset from lpot.utils.utility import LazyImport from PIL import Image mx = LazyImport('mxnet'...
= 0 elif self.perfect_play_bonus > 0: self.perfect_play_bonus -= 4000 score += 4000 try: sound.sfx_lib.get('point').play() except AttributeError as error: pass if self.perfect_play_bonus <= 0: self.perfect_play_bonus = 0 self.score_timer = 0 elif not self.leave: self.fadeout_step = 255 self.leave = True ...
"▁26.": 4472, "▁Gian": 4473, "bia": 4474, "▁Or": 4475, "ÂN": 4476, "õi": 4477, "-17": 4478, "▁2007.": 4479, "▁Nou": 4480, "lida": 4481, "▁91": 4482, "▁Will": 4483, "96": 4484, "tter": 4485, "▁laser": 4486, "gas": 4487, "dor": 4488, "90": 4489, "▁Arab": 4490, "▁Tan": 4491, "▁1968": 4492, "▁2.500": 4...
<gh_stars>1-10 """ A module that provides functions for computing Pixel Area Maps (PAM) based on polynomial distortion model contained in a FITS WCS. Tabular distortions ``NPOL`` and ``DET2IM`` used to describe ``HST/ACS`` distortions are ignored. :Authors: <NAME> :License: :doc:`LICENSE` """ import numbers import n...
Map 215 (main)", [], False, [], [], [], [], [], [], [], []], 436: [False, [437], 2, [5,21,0,b"\x00"], 0, "Pyramid: Map 216 (N)", [], False, [], [], [], [], [], [], [], []], 437: [False, [411], 2, [5,21,0,b"\x00"], 0, "Pyramid: Map 216 (S)", [], False, [], [], [], [], [], [], [], []], 438: [False, [], 2, [5,21,0,b"\x...
import enum import logging import re from typing import Mapping, Optional, Sequence, Text, Tuple import numpy as np import tensorflow.compat.v2 as tf import tensorflow_datasets as tfds import tensorflow_probability as tfp import autoaugment Batch = Mapping[Text, np.ndarray] MEAN_RGB = (0.485 * 255, 0.456 * 255, 0.40...
<filename>dmscan.py #!/usr/local/bin/python3 import logging import argparse import sys import re import os from _datetime import datetime import pandas as pd import yaml from pandas.api.types import is_numeric_dtype from scanner_plugin import ScannerPlugin import xlsxwriter.utility as xlsutil def config(yaml_filenam...
- m.b43 + m.b82 <= 1) m.c236 = Constraint(expr= m.b42 - m.b44 + m.b83 <= 1) m.c237 = Constraint(expr= m.b42 - m.b45 + m.b84 <= 1) m.c238 = Constraint(expr= m.b42 - m.b46 + m.b85 <= 1) m.c239 = Constraint(expr= m.b43 - m.b44 + m.b86 <= 1) m.c240 = Constraint(expr= m.b43 - m.b45 + m.b87 <= 1) m.c241 = Constraint(ex...
<reponame>richpsharp/forest_carbon_edge_effects import time import os import cProfile import pstats import multiprocessing import gdal import osr import numpy import math import sys from invest_natcap import raster_utils BIOMASS_PREFIXES = ['am', 'af', 'as'] DATA_DIR = os.path.join("C://", "Users", "rich", "Desktop"...
<filename>howdoi/howdoi.py<gh_stars>0 #!/usr/bin/env python ###################################################### # # howdoi - instant coding answers via the command line # written by <NAME> (<EMAIL>) # inspired by <NAME> (<EMAIL>) # # Environemt variable used by application: # HOWDOI_DISABLE_SSL - use http/https con...
"max", value) @property @pulumi.getter def min(self) -> Optional[pulumi.Input[float]]: return pulumi.get(self, "min") @min.setter def min(self, value: Optional[pulumi.Input[float]]): pulumi.set(self, "min", value) @pulumi.input_type class EC2FleetVCpuCountRangeRequestArgs: def __init__(__self__, *, max: Op...
<reponame>GEOS-ESM/AeroApps #!/usr/bin/env python """ Utility to create GEOS-5 Collections on MODIS Level 2 granule. Based on trj_sampler.py and geo_sampler.py <NAME>, November 2014. <NAME>, Aug 2016 - Modified from GEO to LEO """ import os from optparse import OptionParser from datetime import datetime, timede...
<reponame>DistributedML/TorML from __future__ import division import numpy as np import minimizers import utils from numpy.linalg import norm import emcee #import matplotlib.pyplot as pl import random import math import minimizers import utils import pdb class logReg: # Logistic Regression def __init__(self, X, y,...
#!/usr/bin/env python # ============================================================================= # Copyright (c) 2018 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without res...
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
the delimiter (after the optional prefix) " "returned as a set of prefixes. Note: Only '/' is a supported delimiter " "character at this time.") @cli_util.option('--download-dir', required=True, help='The directory where retrieved objects will be placed as files. This directory will be created if it does not exist.')...
<gh_stars>0 # Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. from __future__ import annotations from dataclasses import dataclass from enum import Enum, IntEnum from typing import TYPE_CHECKING, overload from ...exceptions import EmbedOverflow from ...utils.api_object...
= lw * np.max(bc_list) / np.max(bc_list) idx_lwmin = np.where(bc_list / np.max(bc_list) < vmin)[0] linewidths[idx_lwmin] = lw * np.min(bc_list) / np.max(bc_list) lattice_bonds = collections.LineCollection(line_list, colors='k', linewidths=linewidths) ax.add_collection(lattice_bonds) else: if vmin is None: vm...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
<reponame>AndreasKaratzas/stonne from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import itertools import random import os import bisect """Performance microbenchmarks's utils. This module contains...
<filename>lib/notification_service/notification_service/client.py # # 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 unde...
# -*- coding: utf-8 -*- """ Sahana Eden Assets Model @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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,...
<gh_stars>10-100 # pylint: skip-file import copy import warnings from typing import Tuple import numpy as np import xarray as xr import os from pandora.constants import * from pandora.img_tools import rasterio_open warnings.simplefilter(action="ignore") from bokeh.colors import RGB import bokeh.plotting as bpl from...
<gh_stars>0 from __future__ import division # @modified 20180910 - Task #2588: Update dependencies # matplotlib.use is now required before statsmodels.api from matplotlib import use as matplotlib_use matplotlib_use('Agg') import pandas import numpy as np import scipy import statsmodels.api as sm # @modified 20160821 -...
# ####################### BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Co...
assert self.ptr_info.size == self.ptr_info.alignment ptr_size = self.emit( ir.Const(self.ptr_info.size, "ptr_size", ir.ptr) ) # Loop over elems which initialize table: for offset, functions in elems: # Start at the bottom of the variable table: address = table_variable # Add offset: offset_value = self.gen_e...
<filename>mmtbx/maps/__init__.py from __future__ import division import mmtbx.utils import iotbx.phil from scitbx.array_family import flex from libtbx.utils import Sorry, date_and_time from libtbx import adopt_init_args from libtbx.str_utils import show_string from libtbx.math_utils import ifloor, iceil import libtbx.c...
from astropy.wcs import WCS from .time import tGTI, GTI from .mask import edges as medges from ._det_spatial import offset_to_vec, DL from .orientation import get_elongation_plane_norm, align_with_z_quat, vec_to_pol, minimize_norm_to_survey import numpy as np from math import cos, sin, pi, sqrt from scipy.spatial impor...
<gh_stars>1-10 import json import re import uuid from socket import gaierror from cryptography.fernet import Fernet from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User from django.db import IntegrityError from django.shortcuts import...
it, it will add the annotation type If the user unchecked it, it will remove the annotation type Updates the window object after changes are made Args: self: window object annotation: type of annotation that is being modified checked: value of checkbox, true if checked and false if unchecked Returns: None """...
to phase 'Before Solution' sage: qe.phase() # optional - qepcad 'Before Solution' sage: qe.go() # optional - qepcad 3 x - 2 > 0 sage: qe.phase() # optional - qepcad 'EXITED' """ match = self._qex.expect().match if match == pexpect.EOF: return 'EXITED' else: return match.group(1) def _parse_answer_stats(se...
<gh_stars>1-10 #!/usr/bin/env python # # copy_repo.py: create multiple, interleaved copies of a set of repositories. # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache S...
delete_user" % key ) params[key] = val del params["kwargs"] # verify the required parameter 'user' is set if self.api_client.client_side_validation and ( "user" not in params or params["user"] is None ): # noqa: E501 raise ValueError( "Missing the required parameter `user` when calling `delete_user`" ) # noqa...
import numpy as np import open3d as o3d from PIL import Image, ImageDraw class BoundingBox3D: """Class that defines an axially-oriented bounding box.""" next_id = 1 def __init__(self, center, front, up, left, size, label_class, confidence, meta=None, show_class=False, show_confidence=False, show_meta=...
<reponame>emmaline11235/see-segment """ Classifer algorithm library designed to classify images with a searchable parameter space. This libary actually does not incode the search code itself, instead it just defines the search parameters and the evaluation funtions. In other words, the following classes are wrappers of...
job from scheduler.') self._scheduler_callback.pop(name) self._scheduler_config.pop(name, None) def _add_scheduler(self, name, callback): """ Stage a scheduler in a driver. The job will actually be configured and started by initialize_scheduler @param name the name of the job @param callback the handler when ...
object of this type" # 2) An integer N. This means "this task returns N objects" # 3) A basic iterable (tuple, list...). This means "this task # returns an iterable with the indicated elements inside # We are returning multiple objects until otherwise proven # It is important to know because this will determine if...
print('pr_scores : ',[pr_boxes[key]['scores'][j] for j in jj]) # print('pr_class_ids : ',[pr_boxes[key]['class_ids'][j] for j in jj]) return output_gt_boxes, output_pr_boxes ##------------------------------------------------------------------------------------------ ## Build mAP data structure (for all classes co...
<reponame>mattmorganpdx/cvpysdk # -*- 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 obtai...
= table.findAll("th") assert "Link" == ths[0].string.strip() for expected_col, th in zip(("pk1", "pk2", "content"), ths[1:]): a = th.find("a") assert expected_col == a.string assert th["class"] == [f"col-{expected_col}"] assert a["href"].endswith(f"/compound_primary_key?_sort={expected_col}") expected = [ [ '<...
= fixture_v_from_i['nNsVth'] I = fixture_v_from_i['I'] I0 = fixture_v_from_i['I0'] IL = fixture_v_from_i['IL'] V_expected = fixture_v_from_i['V_expected'] V = pvsystem.v_from_i(Rsh, Rs, nNsVth, I, I0, IL, method=method) assert(isinstance(V, type(V_expected))) if isinstance(V, type(np.ndarray)): assert(isinstan...
beforehand. .. warning:: Column indices in ``subscales`` are assumed to start at 1 (instead of 0) to avoid confusion with questionnaire item columns, which typically also start with index 1! Parameters ---------- data : :class:`~pandas.DataFrame` dataframe containing questionnaire data. Can either be only the...
import numpy as np from pybedtools import BedTool, Interval import pyfasta import parmap import copy # Standard library imports import os import itertools from data_iter_scFAN import DataIterator import pybedtools import pdb import subprocess t_flag = subprocess.getstatusoutput('mkdir tmp_scFAN') pybedtools.set_tempdi...
# # Copyright (C) 2015 ycmd contributors. # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # y...
#!/usr/bin/env python3 __doc__ = \ """The Developmental Cognition and Neuroimaging (DCAN) lab Macaque fMRI Pipeline [1]. This BIDS application initiates a functional MRI processing pipeline built upon the Human Connectome Project's minimal processing pipelines [2]. The application requires only a dataset conformed to ...
""" Install solc """ import argparse import logging import os import re import shutil import stat import subprocess import sys import tarfile import tempfile import warnings import zipfile from base64 import b64encode from io import BytesIO from pathlib import Path from typing import Dict, List, Optional, Union import...
############################################################################### # # # Copyright 2017 - <NAME> # # # # 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...
from abc import abstractmethod from collections import defaultdict from enum import IntEnum from typing import Any, DefaultDict, Dict, List, NamedTuple, Optional, Type import torch from typing_extensions import Protocol from l5kit.cle import metrics from l5kit.simulation.unroll import SimulationOutputCLE, TrajectoryS...
functions = { 'Abort': { 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'CheckAcquisitionStatus': { 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'name': 'isDone', 'type': 'ViBoolean' } ], 're...
<gh_stars>1-10 """ ngNRC - NIRCam Detector Noise Simulator Modification History: Nov 2021 - Auto-generate source tables from Gaia DR2 or Simbad queries - Add WFE drifts. Oct 2021 - Use numpy random number generator objects to produce repeatable results. Sept 2021 - Major refactor, splitting out slope_to_level1b a...
""" Main module to load the data """ # pylint: disable=C0330 import re import random import uuid import os from spark_partitionr import schema INVALID_HIVE_CHARACTERS = re.compile("[^A-Za-z0-9_]") storage = {'parquet': 'STORED AS PARQUET', 'com.databricks.spark.csv': ("ROW FORMAT SERDE" "'org.apache.hadoop.hive.s...
s)*\ tf.sin(np.pi*t)+0.05*tf.sin(10*np.pi*x)*tf.sin(10*np.pi*y)*\ tf.sin(10*np.pi*intervalL)*tf.sin(10*np.pi*s)*tf.sin(10*np.pi*t) u_21 = lambda x, y, z, s, t: tf.sin(np.pi*x)*tf.sin(np.pi*y)*tf.sin(np.pi*intervalR)*tf.sin(np.pi*s)*\ tf.sin(np.pi*t)+0.05*tf.sin(10*np.pi*x)*tf.sin(10*np.pi*y)*\ tf.sin(10*np.pi...
91.05*m.x500 - 15.175*m.x505 + m.x1245 == 0) m.c246 = Constraint(expr= - m.x81 - 646.308106937747*m.x491 - 286.734053468873*m.x496 - 84.8062160406618*m.x501 + m.x1246 == 0) m.c247 = Constraint(expr= - m.x82 - 646.308106937747*m.x492 - 286.734053468873*m.x497 - 84.8062160406618*m.x502 + m.x1247 == 0) m.c248 = Const...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import logging from io import StringIO import os import os.path import re import swisseph as swe import sys from indic_transliteration import xsanscript as sanscript from icalendar import Calendar, Event, Alarm from datetime import datetime, date, timedelta import jyotisha...