input
stringlengths
2.65k
237k
output
stringclasses
1 value
from operator import itemgetter from functools import reduce from launcher import parse_file from frequency import get_freq_bounds_ryzen def calc_share_ratios(list_prio, cores): """ Basic Shares calculator""" # Shares calculation logic max_shares_per_app = 100 # collect all high priority apps shares_per_app = No...
<gh_stars>1-10 import libcst as cst from libcst import CSTNode import random from lampion.components.engine import Engine def test_create_engine_with_empty_config(): testobject = Engine({}, "PLACEHOLDER") assert testobject def test_create_engine_with_none_config(): testobject = Engine(None, "PLACEHOLDER_ENGINE_...
Milk</option> <option value="KF-Hip-House-14-Dj-Milk">19/12/12 - KF Hip House #14 - Dj Milk</option> <option value="Gabe-Wrecked-Machines">07/01/12 - Gabe - Wrecked Machines</option> <option value="Aniversario-do-Kengao">13/01/12 - Aniversário do Kengão</option> <option value="Tribe-Club-Summer-Edition">21/01/12 - ...
<reponame>mbaak/Eskapade import numpy as np from sklearn import preprocessing import string import pandas as pd import scipy def generate_unordered_categorical_random_data(n_obs, p, dtype=np.str): """ Generates unordered categorical random data. :param int n_obs: Number of data points (rows) to generat...
<gh_stars>10-100 """ Transform the parse tree produced by parser.py to a higher-level tree using recursive descent. """ from magpieparsers.parser_common import * from magpieparsers.types.evaluator import evaluate from magpieparsers.types.infogripper import * from magpieparsers.cplusplus.normalise import normalise_type...
<reponame>Bertware/microdot-phat # -*- coding: utf-8 -*- tinynumbers = [ [0b11111,0b11111], [0b11111], [0b10111,0b11101], [0b10101,0b11111], [0b11110,0b00011], [0b11101,0b10111], [0b11111,0b00111], [0b10000,0b11111], [0b10101,0b10101], [0b11100,0b11111] ] # add japanese font = { 32: [0x00, 0x00, 0x00, 0x0...
<reponame>BatmanAoD/oil<filename>core/state.py<gh_stars>0 #!/usr/bin/env python # Copyright 2016 <NAME>. 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.apac...
<reponame>yonghoonlee/dymos import numpy as np import openmdao.api as om from ...transcriptions.grid_data import GridData from ...utils.lgl import lgl class VandermondeControlInterpComp(om.ExplicitComponent): """ A component which interpolates control values in 1D using Vandermonde interpolation. Takes training ...
# <NAME>, March 2020 # Common code for PyTorch implementation of Copy-Pasting GAN import copy import itertools import matplotlib.pyplot as plt import numpy as np import os, platform, time import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms f...
<filename>algogalaxy/cluster/kmeans.py """ @author: <NAME> @email : <EMAIL> @date : 29/6/21 5:44 pm @desc : @ref : """ import numpy as np from algogalaxy.base import BaseEstimator from utils.util_metric_funcs import euclidean_dist, angle, sq_euclidean_dist # ============================================================...
import logging import logging.handlers import queue from multiprocessing import JoinableQueue, Process, active_children from time import sleep # IMPORTS FOR TYPE HINTING from typing import Callable, List, Optional, Type, Union class PipelineManager: """ Class encapsulating multiprocessing library in Python. This c...
<reponame>autodidact-m/Projects # coding: utf-8 # In[1]: import csv import pandas as pd import os pd.options.mode.chained_assignment = None import numpy as np import boto3 from boto3.s3.transfer import S3Transfer import sys # In[5]: def readFile(): homepath = os.path.expanduser('~') indicator_data = pd.read_cs...
<filename>old_game/maps.py import pygame from . import image import weakref from . import characters import math from . import pfov import collections from . import pygwrap from . import enchantments from . import items from . import context import random from . import monsters from . import container # Enumerated con...
= self._create_excel_writer_styles(excel_writer_styles) def __str__(self): return f'{self.__class__.__name__}(name={self.name})' @classmethod def _create_excel_writer_styles(cls, styles=None): """ Sets the styles for the ouput Excel file. Ensures that at least cls.excel_styles are included in the style dict...
# Miscellaneous functions used to search collect lyrics for all Billboard # Hot 100 number one songs from 1959 - 2011 # Lyric data scraped from lyricsfly.com where available from django.conf import settings from django.template import Template, Context from gdutils.scrape import post, get import BeautifulSoup as BS #...
""" Cadastre - Dialog classeas This plugins helps users to import the french land registry ('cadastre') into a database. It is meant to ease the use of the data in QGIs by providing search tools and appropriate layer symbology. begin : 2013-06-11 copyright : (C) 2013,2019 by 3liz email : <EMAIL> This program is free...
Returns: true. """ pass def IsControlElementCore(self, *args): #cannot find CLR method """ IsControlElementCore(self: UIElementAutomationPeer) -> bool Gets or sets a value that indicates whether the System.Windows.UIElement that is associated with this System.Windows.Automation.Peers.UIElemen...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # "Probabilistic Grammar Fuzzing" - a chapter of "The Fuzzing Book" # Web site: https://www.fuzzingbook.org/html/ProbabilisticGrammarFuzzer.html # Last change: 2022-02-09 08:26:36+01:00 # # Copyright (c) 2021 CISPA Helmholtz Center for Information Security # Copyright (c)...
<gh_stars>0 ######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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 # # U...
<gh_stars>1-10 ############################################################################# # # # webGen module to BFA c7 # # ############################################################################# """ This is a simple HTML/JS/CSS generator/framework mainly for the purpose of maintaining the webclient of bfa. It...
14 - 14: iIii1I11I1II1 - iIii1I11I1II1 I1IiIiiIiIII = lisp_core_commands [ "lisp debug" ] I1IiIiiIiIII = I1IiIiiIiIII [ 1 ] if 5 - 5: IiII if 84 - 84: II111iiii * oO0o * II111iiii % IiII / I1IiiI if 100 - 100: IiII . Ii1I - iIii1I11I1II1 . i11iIiiIii / II111iiii if 71 - 71: I1Ii111 * Oo0Ooo . I11i if 49 - 49: Ii...
+ eY**2 + fXY BiQuadratic solution requires a minimum of 6 data pairs QuadraticLinear Table Equation: Output = a + bX + cX**2 + dY + eXY + fX**2Y QuadraticLinear solution requires a minimum of 6 data pairs """ _schema = {'extensible-fields': OrderedDict([(u'x value', {'name': u'X Value', 'pyname': u'x_value', '...
stoptimestamp timestamp without time zone, startremarks character varying(256), stopremarks character varying(256), dbupdatedtimestamp timestamp without time zone NOT NULL, logfile character varying(256) NOT NULL); """)) op.execute(textwrap.dedent(""" CREATE TABLE tier2_switch_history ( lctn character varying(...
Bit direction [0,1], # top-left position contains white cell [0,1], # top-center position contains white cell [0,1], # top-right position contains white cell [0,1], # mid-left position contains white cell [0,1], # mid-center position contains white cell [0,1], # mid-right position contains white cell [0,1], # bo...
sol18 = Eq(f(x), C1 + C2 * x + C3 * x ** 2 + C4 * exp(-3 * x)) sol19 = Eq(f(x), C1 + C2 * x + C3 * exp(x * sqrt(2)) + C4 * exp(-x * sqrt(2))) sol20 = Eq(f(x), (C1 + C2 * x) * exp(-3 * x) + (C3 + C4 * x) * exp(2 * x)) sol21 = Eq( f(x), C1 * exp(x / 2) + C2 * exp(-x) + C3 * exp(-x / 3) + C4 * exp(x * Rational(5, ...
import abc import asyncio import enum import json import logging import re import ssl from base64 import b64encode from collections import defaultdict from collections.abc import AsyncIterator, Callable, Iterable, Sequence from contextlib import suppress from dataclasses import dataclass, field, replace from datetime i...
await delete_article_response.release() async def metadata(self, path, **kwargs): """Return metadata for entity identified by ``path`` under the parent project. :param FigsharePath path: entity whose metadata will be returned :rtype: FigshareFileMetadata obj or list of Metadata objs """ if path.is_root: path.i...
'--use-old-getter-setter': self.UseOldGetterSetter = 1 elif option[0] in ('-u', '--user-methods'): UserMethodsPath = option[1] elif option[0] == '--no-process-includes': self.processIncludes = 0 elif option[0] == "--silence": self.outputText = False elif option[0] == "--namespacedef": self.namespacedef = optio...
<filename>tests/test_editor_api.py import os import json from django.test import TestCase import libs.track as track import TrackApp.models as models import tests.testing_utils as testing_utils class EditorTestUtils(TestCase): def create_user(self, username='default_user', password='<PASSWORD>', email='<EMAIL>')...
<reponame>h3dema/deepwifi #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Environment implementation (abstract class) that represents the experiment using Video This class implements the basic functions to control the APs, but it does not implement the QoE """ import time import logging import pickle from abc i...
<reponame>UBC-MDS/mindthegap from dash import Dash, html, dcc, Input, Output import numpy as np import pandas as pd import altair as alt from vega_datasets import data import dash_bootstrap_components as dbc import os app = Dash( __name__, title="Mindthegap Dashboard", external_stylesheets=[dbc.themes.BOOTSTRAP] ) s...
0x0000408f, 0x08b80000, 0xc800204788b80000, b"c800204788b80000", b"C", b"T"), (b"mt", 25, 16528, 0x00004090, 0x08e80000, 0xc800204808e80000, b"c800204808e80000", b"t", b"c"), (b"MT", 25, 19870, 0x00004d9e, 0x0d636362, 0xc80026cf0d636362, b"c80026cf0d636362", b"T", b"ACGTACGTAC"), (b"MT", 25, 19871, 0x00004d9f, 0x508...
<filename>dfxapiclient/simpleclient.py import asyncio import copy import json import os import uuid from .measurements import Measurement from .measurements_pb2 import SubscribeResultsRequest from .organizations import Organization from .users import User from .websocketHelper import WebsocketHandler class SimpleCli...
<reponame>sail-sg/mugs<filename>src/vision_transformer.py # Copyright 2022 Garena Online Private Limited # # 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/LIC...
""" Tests of Tax-Calculator using puf.csv input. Note that the puf.csv file that is required to run this program has been constructed by the Tax-Calculator development team by merging information from the most recent publicly available IRS SOI PUF file and from the Census CPS file for the corresponding year. If you ha...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 agre...
) projection_tensor = self.projection_layer(inputs=Z) print_obj( "\n" + func_name, "projection_tensor", projection_tensor ) # Reshape projection into "image". # shape = ( # cur_batch_size, # projection_height, # projection_width, # projection_depth # ) projection_tensor_reshaped = tf.reshape( tensor=proje...
= timeSeriesPosition else: logEvent("ERROR! Wavetools.py: Location vector for timeSeries must have three-components",level=0) sys.exit(1) # Mean water level self.mwl = mwl # Wave direction self.waveDir = setDirVector(waveDir) # Gravity self.g = np.array(g) # Derived variables # Gravity magnitude self.gAbs...
b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a =...
<reponame>ntaagarwal/indoorInverse []# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import random import PIL import torch import torchvision from torchvision.transforms import functional as F from torchvision.transforms.transforms import Lambda from torch.nn.functional import interpolate, pad #...
<filename>http_auth/passive_datapool.py # Data pool with passive reclaim # A part of the httpauth-lib derived from DOORMEN controller. # (c) 2018 National Institute of Advanced Industrial Science and Technology. import weakref import threading import collections import types import sys wr = weakref.ref wr_None = lamb...
# -*- coding: utf-8 -*- """ """ import logging import pkg_resources import time from mingus.containers import Note, NoteContainer, Bar, Track from mingus.midi.fluidsynth import FluidSynthSequencer from mingus.midi import pyfluidsynth as globalfs from typing import Union from pathlib import Path from .keyboard import ...
# Copyright 2020 The TensorFlow Ranking Authors. # # 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...
<gh_stars>0 # SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project. class Config: """ Config """ def __init__(self): pass def CreateFromEnv(self): """ CreateFromEnv() Create a :py:class:`PyOpenColorIO.Config` object using the environment variable. :returns: Config ...
= enemy_formation enemy = enemies_not_dead_already[0] if len(enemies_not_dead_already) > 0 else None blinding_stun_chance, disorienting_stun_chance, plague_poison_dmg = None, None, None if 'blinding_gas' in hero.skills: blinding_stun_level = hero.skills['blinding_gas'] blinding_stun_chance = AttackSkills['b...
B1, B2] idxs = [ (-3, 1, 2), (-4, 2, 3), (-1, 1, 4), (-2, 4, 3) ] rholoc = scon(to_contract, idxs).reshape((d**2, d**2)) return rholoc # def DMRG_superblock(left, right, hL, h, hR): # theta = twositecontract(left, right, h) # theta = thetaleft(theta, hL) # theta = thetaright(theta, hR) # return theta """ ...
or array_like): Slippage in percentage of price. Will broadcast. Note that 0.01 = 1%. min_size (float or array_like): Minimum size for an order to be accepted. Will broadcast. max_size (float or array_like): Maximum size for an order. Will broadcast. Will be partially filled if exceeded. You might not be able to...
<reponame>Bruce979527682/ProjectHelper<gh_stars>0 #!/usr/bin/python # -*- coding: UTF-8 -*- import xlrd # 读 import xlwt # 写 import math import datetime import os def GetDesktopPath(): return os.path.join(os.path.expanduser("~"), 'Desktop') deskPath = GetDesktopPath() cdate = datetime.datetime.now().strftime('%Y-%m-...
""" This file contains classes and functions for representing, solving, and simulating agents who must allocate their resources among consumption, saving in a risk-free asset (with a low return), and saving in a risky asset (with higher average return). """ import numpy as np from copy import deepcopy from HARK import ...
+ toGuess[6:] if word[1] != "Z" and word[1] != "z" and word[2] != "Z" and word[2] != "z" and word[3] != "Z" and word[3] != "z" and word[4] != "Z" and word[4] != "z" and word[5] != "Z" and word[5] != "z" : print("\nWrong!\n") numberOfErrors = numberOfErrors + 1 wrongChars = wrongChars + "z" + ", " if nu...
## Automatically adapted for numpy.oldnumeric Jul 23, 2007 by ############################################################################# # # Author: <NAME> # # Copyright: <NAME> TSRI 2000 # ############################################################################# # # $Header: /opt/cvs/DejaVu2/povray3.py,v 1.1...
from __future__ import print_function, division, absolute_import from llvm.core import Type, Constant import llvm.core as lc import llvm.ee as le from llvm import LLVMException from numba.config import PYVERSION import numba.ctypes_support as ctypes from numba import types, utils, cgutils, _helperlib, assume _PyNone ...
4).permute(0, 1, 4, 2, 3).contiguous() sample_feats = sample_feats.view((n, -1, h, w)) return sample_feats def forward(self, x): ret = {} center_feat = self.center_conv(x) center_map = self.center_head(center_feat) corner_feat = self.corner_conv(x) corner_map = self.corner_head(corner_feat) fg_feat = self.f...
import numpy as np from calciumflexanalysis import calcium_flex as cal from collections import defaultdict import pandas as pd import matplotlib.pyplot as plt from datetime import date import copy class CaFlexGroup: """Class used for the analysis of multiple Calcium Flex well plates. :param caflexplates: List of ...
not in kwargs.keys(): e.code.CodingError( msgs=[ f"The yaml_state dict loaded from file_or_text " f"does has parent_folder set to `..`", f"This means we do not have access to " f"parent_folder instance so please supply it " f"while Folder syncs files/folders inside it.", f"Note that if you are using from_yaml t...
<reponame>inkmonk/flask-sqlalchemy-plus # from sqlalchemy import func from __future__ import absolute_import from toolspy import subdict, remove_and_mark_duplicate_dicts, merge from sqlalchemy.ext.associationproxy import AssociationProxyInstance from sqlalchemy.ext.orderinglist import OrderingList from sqlalchemy.orm i...
# check the standard deviation of the transformed feature # we set ddof to 1 so that np.std gave the same result as pandas .std # we also set the tolerance limit to account for cases where std # is computed as a very low decimal rather than 0 # We only do this for the training set. if exclude_zero_sd: feature_sd ...
<gh_stars>10-100 import time import random import glob import argparse import logging import sys import os from PIL import Image import uuid import copy import numpy as np import carla_utils import pickle import dynamic_weather as weather import datetime import csv try: import queue except ImportError: import Queue a...
<reponame>sunny-shu/libgo # Status: being ported by Steven Watanabe # Base revision: 47077 # TODO: common.jam needs to be ported # TODO: generators.jam needs to have register_c_compiler. # # Copyright 2001 <NAME>. # Copyright 2002-2006 <NAME>. # Copyright 2002-2003 <NAME>. # Copyright (c) 2005 <NAME>. # Copyright 2006 ...
""" Data objects in group "Performance Tables" """ from collections import OrderedDict import logging from pyidf.helper import DataObject logger = logging.getLogger("pyidf") logger.addHandler(logging.NullHandler()) class TableOneIndependentVariable(DataObject): """ Corresponds to IDD object `Table:OneIndependent...
self.args[1].value = (self.args[0].value * self.args[0].value) % program.P @base.gf2n @base.vectorize class inverse(base.DataInstruction): r""" Load secret variables $s_i$, $s_j$ and $s_k$ with the next inverse triple. """ __slots__ = [] code = base.opcodes['INV'] arg_format = ['sw','sw'] data_type = 'inverse' ...
import torch import nrrd import sys from PIL import Image from torchvision.transforms import ToTensor from torch.utils import data from torch.utils.data.sampler import SequentialSampler from torch.utils.tensorboard import SummaryWriter from torch.cuda.amp import autocast import torchvision as tv import torch.nn as nn i...
<filename>scripts/base_network.py<gh_stars>1-10 # SPDX-FileCopyrightText: : 2017-2020 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT # coding: utf-8 """ Creates the network topology from a `ENTSO-E map extract <https://github.com/PyPSA/GridKit/tree/master/entsoe>`_ (March 2022) as a PyPSA network. Relevant Se...
# coding: utf-8 import numpy as np import tensorflow as tf from tensorflow.contrib.rnn import RNNCell from tensorflow.python.ops import rnn_cell_impl #from tensorflow.contrib.data.python.util import nest from tensorflow.contrib.framework import nest from tensorflow.contrib.seq2seq.python.ops.attention_wrapper import _b...
<reponame>brianhuey/vissim<filename>vissim_v5/vissim_v5.py<gh_stars>10-100 #!/usr/bin/env python """ VISSIM Tools v2.0 """ from re import findall as _findall, match as _match, search as _search from re import split as _split from math import sqrt as _sqrt from copy import copy as _copy def _median(lst): """ Stock me...
reaction dataset. processed_dataset = pd.read_pickle(args.dataset_config.output_folder + "final_training_dataset.pkl") folds = [[] for _ in range(args.dataset_config.num_folds)] for cls in np.unique(processed_dataset["reaction_class"].values): # Select the subset of data with the respective class label. class_sub...
71);\n" "border-radius: 8px;") self.generate3.setIconSize(QtCore.QSize(30, 30)) self.generate3.setObjectName("generate3") self.insert3 = QtWidgets.QPushButton(self.frame_4) self.insert3.setGeometry(QtCore.QRect(20, 150, 161, 41)) font = QtGui.QFont() font.setFamily("Open Sans") font.setPointSize(12) self.insert...
"""Utilities for creating XDMF metadata from results stored in HDF5. XDMF utilities are separate from the core xdmf to reduce core dependencies. See: - core.xdmf license: HDF5Application/license.txt """ import xml.etree.ElementTree as ET import os import warnings from itertools import chain from contextlib import ...
VM roles \"" _msg += ','.join(_required_imageid_list[_imageid]) + "\": \"" _msg += _imageid + "\" " if _imageid in map_id_to_name : _msg += "(\"" + map_id_to_name[_imageid].strip() + "\") " _msg += "is NOT registered " _msg += "(attaching VMs with any of these roles will result in error).\n" if not len(_detect...
SystemService(self.com_object.SystemService) @property def top(self) -> float: """ .. note:: :class: toggle CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445) | o Property Top() As float | | Returns or sets the distance from the application'si frame window top to | the top of the screen. This distance ...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Reports builder for BIDS-Apps. Generalizes report generation across BIDS-Apps """ from pathlib import Path import re from itertools import product from collections import defaultdict from pkg_resource...
<gh_stars>0 ''' CFFI interface to libpq the library ''' from __future__ import print_function from distutils import sysconfig import os.path import re import sys import subprocess from cffi import FFI PLATFORM_IS_WINDOWS = sys.platform.lower().startswith('win') LIBRARY_NAME = 'pq' if not PLATFORM_IS_WINDOWS else '...
#! /usr/bin/env python3 import argparse import cmd import csv import glob import json import os import platform import re import sys import textwrap import traceback from collections import OrderedDict import configparser import subprocess import tempfile try: import readline import atexit except ImportError: readli...
in idxs}) return nhyd_dct # # # charge layers def charge(chi): """ Determine charge from the ChI string :param chi: ChI string :type chi: str :rtype: int """ char_lyr_dct = charge_layers(chi) char = int(char_lyr_dct['q']) return char # # # stereo layers def bond_stereo_parities(chi, one_indexed=False): ...
state", b'PROP AUTO FEATHER ARMED:index', b'Bool', 'N'], "PROP_FEATHER_SWITCH:index": ["Prop feather switch", b'PROP FEATHER SWITCH:index', b'Bool', 'N'], "PANEL_AUTO_FEATHER_SWITCH:index": ["Auto-feather arming switch", b'PANEL AUTO FEATHER SWITCH:index', b'Bool', 'N'], "PROP_SYNC_ACTIVE:index": ["True if pro...
3) OP '.' (1, 3) (1, 4) NAME 'async' (1, 4) (1, 9) OP '+' (1, 10) (1, 11) NUMBER '1' (1, 12) (1, 13) >>> dump_tokens("async def foo(): dalej") ENCODING 'utf-8' (0, 0) (0, 0) ASYNC 'async' (1, 0) (1, 5) NAME 'def' (1, 6) (1, 9) NAME 'foo' (1, 10) (1, 13) OP '(' (1, 13) (1, 14) OP ')' (1, 14) (1, 15) OP ':' ...
<filename>EP4/ep4.py """ AO PREENCHER ESSE CABECALHO COM O MEU NOME E O MEU NUMERO USP, DECLARO QUE SOU A UNICA PESSOA AUTORA E RESPONSAVEL POR ESSE PROGRAMA. TODAS AS PARTES ORIGINAIS DESSE EXERCICIO PROGRAMA (EP) FORAM DESENVOLVIDAS E IMPLEMENTADAS POR MIM SEGUINDO AS INSTRUCOES DESSE EP E, PORTANTO, NAO CONSTIT...
# -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- import os import time import datetime import numpy as np import torch ...
from taskinit import * import time import os import re import json import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import interp1d import partitionhelper as ph from mpi4casa.MPICommandClient import MPICommandClient # pieflag is released under a BSD 3-Clause License # See LICENSE for details ...
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.lines import Line2D from modpy.random import normal_pdf, UniformDist, JointDistribution from modpy.design import kennard_stone_design from modpy.optimize import mmo, nlprog, cma_es, bayesian_proposal, NonlinearConstraint...
= bytearray(enc_msg[:-32]) encrypted_data[-1] ^= 1 # Bad padding enc_msg = bytes(encrypted_data) + hmac_digest(key_m, encrypted_data, _sha256) with pytest.raises(DecryptionError) as e: priv.decrypt_message(enc_msg) assert 'padding' in str(e.value) enc_msg = bytes.fromhex( '4249453102e5cde5b5924d745958ba05c87d6d...
RichardHufford" player = axl.SecondByRichardHufford expected_classifier = { "memory_depth": float("inf"), "stochastic": False, "makes_use_of": set(), "long_run_time": False, "inspects_source": False, "manipulates_source": False, "manipulates_state": False, } def test_strategy(self): actions = [(C, C)] * 19...
map["tiles"][0]["img"]) ): if os.path.exists( os.path.splitext( urllib.parse.unquote(map["img"] or map["tiles"][0]["img"]) )[0] + args.jpeg ): map["img"] = os.path.splitext(map["img"])[0] + args.jpeg elif os.path.exists( os.path.splitext( urllib.parse.unquote(map["img"] or map["tiles"][0]["img"]) )[0] + "....
table Description: The table name to use Type: str ######## Outputs ######## Variable: data Description: fetched maximum of chosen_key in odbc query Type: depend on column """ warnings.warn("get_min is deprecated, please use SQL in original", DeprecationWarning) if key==None: key=self.ts_chosen_key if da...
<reponame>OverLordGoldDragon/dev_tg<gh_stars>1-10 # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2022- <NAME> # # Distributed under the terms of the MIT License # (see wavespin/__init__.py for details) # -------------------------------------------...
"""Pre-commit tests.""" from textwrap import dedent import pytest from testfixtures import compare from nitpick.constants import PRE_COMMIT_CONFIG_YAML, SETUP_CFG from nitpick.plugins.pre_commit import PreCommitHook from nitpick.violations import Fuss from tests.helpers import NBSP, ProjectMock def test_pre_commit_...
#!/usr/bin/python # -*- coding: utf-8 -*- from argparse import Namespace import datetime, openpyxl as xl, os import code import operator, collections import re import unicodecsv as csv import math # Django imports from argparse import Namespace from django.core.management.base import BaseCommand, CommandError from dj...
we use paired sample test. There are 2 types of paired sample test, one is comparing sample means coming from 2 different groups, known as Independent Paired Sample T-Test. On the other hand, when comparing 2 samples coming from same groups, we call it as Dependent Paired Sample T-Test. T-test is only applicable fo...
<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Wed Jul 31 13:41:32 2019 @author: s146959 """ # ========================================================================== # # ========================================================================== # from __future__ import absolute_import, with_statement, absolu...
{ "user-agent": "APIMATIC 2.0", "accept": "application/json", "X-Auth-Token": Configuration.x_auth_token, "X-Auth-Token": Configuration.x_auth_token } # Prepare the API call. http_request = self.http_client.post(query_url, headers=headers) # Invoke the API call to fetch the response. response = se...
# # 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 may not u...
observed samle rects2 = plt.bar(index, house_selling_model(chunks, r)[1], bar_width,alpha=opacity,color='black',label='Achieved') #Plot the minimum values of each observed sample rects1 = plt.bar(index + bar_width, house_selling_model(chunks, r)[0], bar_width, alpha=opacity,color='darkred',label='Optimal') #L...
<reponame>adgilbert/med-seg<gh_stars>0 import logging import os from abc import abstractmethod from typing import Callable, Tuple import cv2 import numpy as np import pandas as pd import scipy.stats as st import torch from scipy.spatial.distance import cosine as cosine_dist from scipy.spatial.distance import directed_...
#!/usr/bin/env python from collections import deque from geometry_msgs.msg import Pose, PoseStamped, TwistStamped import math import rospy from scipy.spatial import KDTree from std_msgs.msg import Int32 from styx_msgs.msg import Lane, Waypoint import sys import tf ''' This node will publish waypoints from the car's c...
format != b"tagdone" and ( line.startswith(b"Date: ") or line.startswith(b"date: ") ): date = line[6:] format = b"tag" elif format == b"tag" and line == b"": # when looking for tags (subject: from: etc) they # end once you find a blank line in the source format = b"tagdone" elif message or line: message.appen...
- I11i if 47 - 47: oO0o . i1IIi * I1ii11iIi11i % OOooOOo % IiII / Oo0Ooo if ( len ( self . registered_rlocs ) == 0 ) : self . registered = False return if 39 - 39: i11iIiiIii . OOooOOo + Oo0Ooo if 92 - 92: O0 * Oo0Ooo / o0oOOo0O0Ooo % OoO0O00 def merge_rles_in_site_eid ( self ) : if 87 - 87: OoooooooOO / I11i . ...
<filename>pymmFunctions.py #!/usr/bin/env python3 ''' This is a set of functions used by pymm scripts This file is organized into 4 main sections: * CONFIG CHECK STUFF * PYMM ADMIN / LOGGING STUFF * FILE CHECK STUFF * SYSTEM / ENVIRONMENT STUFF ''' import configparser from datetime import date import glob import ...
import os import obspy import pickle import numpy as np import scipy.integrate as ig import matplotlib.pyplot as plt from matplotlib.ticker import StrMethodFormatter, NullFormatter from mtspec import mtspec from . import utils as ut from . import config as cfg # VARIABLES READ FROM CONFIG SUPPORTED_SAVE_METHODS = ['p...
#!/usr/bin/env python """ NAME: sparser.py SYNOPSIS: sparser.py [options] filename DESCRIPTION: The sparser.py script is a Specified PARSER. It is unique (as far as I can tell) because it doesn't care about the delimiter(s). The user specifies what is expected, and the order, for each line of text....
<gh_stars>1-10 """ Copyright (c) 2018-2019 Intel Corporation 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 a...