input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>andrewcooke/simple-date<filename>src/simpledate/__init__.py from calendar import timegm import datetime as dt from itertools import islice from collections import OrderedDict from threading import local from tzlocal import get_localzone from pytz import timezone, country_timezones, all_timezones, FixedOffset...
import time import struct try: # Try to import the Python 3.x enum module from enum import IntEnum except: # If we're on Python 2.x we need to define # a dummy replacement class IntEnum: pass # <pep8 compliant> LOG_READ_TIME = False LOG_WRITE_TIME = False LOG_ANIM_HEADER = False LOG_ANIM_BONES = False LOG_ANI...
an exception with pytest.raises(pytest_subprocess.ProcessNotRegisteredError) as exc: subprocess.check_call("test") assert str(exc.value) == "The process 'test' was not registered." # now, register two processes once again, but the last one will be kept forever fake_process.register_subprocess("test", stdout="fir...
# coding: utf-8 # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. import re # noqa: F401 import sys # noqa: F401 from datadog_api_clie...
Texture"].location = (-500, 200) # bsdf = bpy.data.materials[activeMaterialName].node_tree.nodes[bsdf.name] # imgTex = bpy.data.materials[activeMaterialName].node_tree.nodes[normalName].outputs[0] # link_output_to_slot_named(bpy.data.materials[activeMaterialName], imgTex, bsdf, "Normal") #bpy.data.images[normalName].s...
<filename>autotest/ogr/ogr_gpkg.py #!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test GeoPackage driver functionality. # Author: <NAME> <<EMAIL>> # ########################################...
##################################################### # # # Source file of the Matrix Elements exports for # # the PyOut MG5aMC plugin. # # # ##################################################### import os import logging import fractions import shutil import itertools import copy from math import fmod import subproces...
# Copyright 2018 The dm_control 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 to in w...
0.5*m.b276*m.b324 + 0.5*m.b276* m.b342 + 0.5*m.b276*m.b351 + 0.5*m.b276*m.b355 + 0.5*m.b276*m.b361 + 0.5*m.b276*m.b363 + 0.5* m.b276*m.b372 + 0.5*m.b276*m.b375 + 0.5*m.b276*m.b376 + 0.5*m.b276*m.b377 + 0.5*m.b276*m.b383 + 0.5*m.b276*m.b386 + 0.5*m.b276*m.b390 + 0.5*m.b276*m.b394 + 0.5*m.b276*m.b419 + 0.5*m.b276*m.b...
USED IN SHGO try: for c in self.H[self.gen]: if self.symmetry: # self.sub_generate_cell_symmetry(c, self.gen + 1) self.split_simplex_symmetry(c, self.gen + 1) else: self.sub_generate_cell(c, self.gen + 1) except IndexError: no_splits = True # USED IN SHGO self.gen += 1 return no_splits # USED IN SHGO # @l...
"""Define the Dataset and FileDataset classes. The Dataset class represents the DICOM Dataset while the FileDataset class adds extra functionality to Dataset when data is read from or written to file. Overview of DICOM object model ------------------------------ Dataset (dict subclass) Contains DataElement instances...
<reponame>domdfcoding/domdf_python_tools<filename>tests/test_stringlist.py # stdlib import pickle from textwrap import dedent # 3rd party import pytest # this package from domdf_python_tools.stringlist import DelimitedList, Indent, StringList, joinlines, splitlines class TestStringList: def test_creation(self): ...
<gh_stars>0 import dropbox import hashlib import math import os import pdbox import shutil from pdbox.utils import DropboxError, dbx_uri, execute, normpath def get_remote(path, meta=None): """ Get a RemoteFile or RemoteFolder from path. Raises: - ValueError """ if meta: # Don't look up the path, just use what'...
<gh_stars>10-100 # -*- coding: utf-8 -*- # # Author: <NAME>, Finland 2015-2019 # # This file is part of Kunquat. # # CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/ # # To the extent possible under law, Kunquat Affirmers have waived all # copyright and related or neighboring rights to Kunquat. # ...
in seen: seen.add(lowest + can_replicate) queue.append(lowest + can_replicate) if lowest + can_replicate - 1 not in seen: seen.add(lowest + can_replicate - 1) queue.append(lowest + can_replicate - 1) for exclude in xrange(0, min(remaining_budget, partial) + 1): cand = get_expected(placed, lowest, exclude ) - ex...
= (Building_Info[i,3], Building_Info[i,4]) # in m Site_Dimensions[j] = (Building_Info[i,5], Building_Info[i,6]) # in m Type[j] = Building_Info[i,7] Solar_Roof_Area[j] = Building_Info[i,8] Height[j] = Building_Info[i,9] ### in ft!! # Create the Low and High Sequence values that control mutation in optimization Low_...
spr_buy_item_triggers("itm_steppe_horse", resources=["itm_saddle", "itm_wheat_sheaf"], herding=1)), ("pw_buy_arabian_horse_a",spr_buy_item_flags(7),"arabian_horse_a","bo_pw_horse", spr_buy_item_triggers("itm_arabian_horse_a", resources=["itm_saddle", "itm_wheat_sheaf"], herding=2)), ("pw_buy_arabian_horse_b",spr_bu...
{type(data)}') def _numpy_to_dataset(self, data): rai = imglyb.to_imglib(data) return self._java_to_dataset(rai) def _ends_with_channel_axis(self, xarr): ends_with_axis = xarr.dims[len(xarr.dims)-1].lower() in ['c', 'channel'] return ends_with_axis def _xarray_to_dataset(self, xarr): """ Converts a xarray d...
from __future__ import print_function, division, absolute_import import functools import sys import warnings # unittest only added in 3.4 self.subTest() if sys.version_info[0] < 3 or sys.version_info[1] < 4: import unittest2 as unittest else: import unittest # unittest.mock is not available in 2.7 (though unittest2 ...
# Copyright (c) 2018, NVIDIA CORPORATION. import warnings import numpy as np import pandas as pd from toolz import partition_all import dask import dask.dataframe as dd from dask import compute from dask.base import normalize_token, tokenize from dask.compatibility import apply from dask.context import _globals from ...
""" AWS API-Gateway Authorizer ========================== This authorizer is designed to be attached to an AWS API-Gateway, as a Lambda authorizer. It assumes that AWS Cognito is used to authenticate a client (UI) and then API requests will pass a JSON Web Token to be validated for authorization of API method calls. T...
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXX XXX XXXXXXXX XXXXX XXX XXXXXXX XXXX XXXXXXXXXXXXXX XXX XXXXXXXX XXX XXXXX XXXX XX XXX X XXXXXXXXXXXXX XXXXXX XXX X XXXXXX XXX XXXX XXXXXX XXXXXXXXX...
is present if self.ncs_object(): for m in [map_manager, map_manager_1, map_manager_2]+\ extra_map_manager_list: if m: m.set_ncs_object(self.ncs_object()) # Make sure all really match: for m in [map_manager, map_manager_1, map_manager_2]+\ extra_map_manager_list: if m and not any_map_manager.is_similar(m): ra...
from .memoize import Memoize from . import stdops #Needed for travis import random def collect(exp, fn): rv = set() def _collect(exp): if fn(exp): rv.add(exp) return exp exp.walk(_collect) return rv def _replace_one(expr, match, repl): vals = WildResults() if expr.match(match, vals): ...
import warnings warnings.filterwarnings( "default", r"plotly\.graph_objs\.\w+ is deprecated", DeprecationWarning ) class Data(list): """ plotly_study.graph_objs.Data is deprecated. Please replace it with a list or tuple of instances of the following types - plotly_study.graph_objs.Scatter - plotly_study.graph_o...
<reponame>soonho-tri/dreal4 # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import math import unittest from dreal import (And, Expression, Formula, Iff, Implies, Not, Or, Variable, Variables, acos, asin, atan, atan2, cos, cosh, exp, forall, if_then_else, intersect, log, log...
== 'ready': continue if sig['TYPE'] == 'rstruct_enable': continue llink_lsb = sig['LLINDEX_MAIN_LSB'] + (rstruct_iteration * llink['WIDTH_MAIN']) lsb2 = sig['LSB'] + (rstruct_iteration * sig['SIGWID']) for unused1 in list (range (0, sig['SIGWID'])): #lsb2=sig['LSB'] + (sig['SIGWID']*iteration) #llink_lsb=sig['L...
#coding:utf-8 # # id: functional.datatypes.decfloat_min_distinguish # title: List of all values starting from 1.0 divided by 2, until previous and current become equal # decription: # Checked on 4.0.0.1740 (both Windows and POSIX give the same result). # # tracker_id: # min_versions: ['4.0.0'] # versions: 4.0 # qmid...
<gh_stars>0 # -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#!/usr/bin/env python2 """ Utilities for performing stochastic matrix and vector compressions. """ import numpy import misc_c_utils import near_uniform def fri_subd(vec, num_div, sub_weights, n_samp): """ Perform FRI compression on a vector whose first elements, vec[i] are each subdivided into equal segments, and ...
<reponame>jorgemorgado/sqlalchemy<filename>test/orm/test_cache_key.py import random import sqlalchemy as sa from sqlalchemy import Column from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import null from sqlalchemy import select from sqlalchemy import Table from...
<gh_stars>0 ''' Some glue code to do workspace related things based on visgraph ''' import sys import time import envi import vivisect import threading import collections from operator import itemgetter import visgraph.pathcore as vg_pathcore import visgraph.graphcore as vg_graphcore xrskip = envi.BR_PROC | envi.BR_...
# 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 a...
# # Autogenerated by Thrift Compiler (0.13.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive impor...
#!/usr/bin/env python3 import argparse import os, atexit import textwrap import time import tempfile import threading, subprocess import barrier, finishedSignal import sys import signal import random import time from enum import Enum from collections import defaultdict, OrderedDict BARRIER_IP = 'localhost' BARRIE...
profile) client._sdkVersion += ("_CLI_" + __version__) models = MODELS_MAP[g_param[OptionsDefine.Version]] model = models.ListAuthorizedApplicationsToUserGroupRequest() model.from_json_string(json.dumps(args)) start_time = time.time() while True: rsp = client.ListAuthorizedApplicationsToUserGroup(model) result ...
<filename>magni/cs/reconstruction/gamp/_algorithm.py """ .. Copyright (c) 2015-2017, Magni developers. All rights reserved. See LICENSE.rst for further information. Module providing the core Generalised Approximate Message Passing (GAMP) algorithm. Routine listings ---------------- run(y, A, A_asq=None) Run the G...
( rule.l2.config.ethertype, table_name, rule_idx)) return rule_props def convert_ip(self, table_name, rule_idx, rule): rule_props = {} # FIXME: 0 is a valid protocol number, but openconfig seems to use it as a default value, # so there isn't currently a good way to check if the user defined proto=0 or not. if...
(all phases) name (str): phase series name y0_dict (dict or None): dictionary of initial values or None - key (str): variable name - value (float): initial value Returns: pandas.DataFrame: Index reset index Columns - Date (pandas.TimeStamp) - variables (int) - Population (int) - Rt (float) - parameter val...
iris = h2o.import_file("http://h2o-public-test-data.s3.amazonaws.com/smalldata/iris/iris.csv") >>> dl1 = H2ODeepLearningEstimator(hidden=[10,10], ... export_weights_and_biases=True) >>> dl1.train(x=list(range(4)), y=4, training_frame=iris) >>> p1 = dl1.model_performance(iris).logloss() >>> ll1 = dl1.predict(iris) >>> p...
import math import random import cv2 import glob import librosa import os from pathlib import Path from audio_extractor import extract_audio_snippets character_map = {0: 'kermit_the_frog', 1: 'waldorf_and_statler', 2: 'pig', 3: 'swedish_chef', 4: 'none'} file_map = {'Muppets-02-01-01.txt': 1, 'Muppets-02-04-04.t...
#!/usr/bin/env python # coding=UTF-8 # Copyright (c) 2011, <NAME>, Inc. # All rights reserved. # # Developer : <NAME> , <EMAIL> , on 2020-02-04 # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of s...
import numpy as np from collections import defaultdict from my_cocoeval import mask as maskUtils from terminaltables import AsciiTable import matplotlib.pyplot as plt import os import pdb NAMES = ('person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', '...
channel_name: results.append(gspaths.Build(gspaths.Build(version=nmo_version, board=self._build.board, channel=self._build.channel, bucket=self._build.bucket))) return results def _DiscoverRequiredFullPayloads(self, images): """Find the Payload objects for the images from the current build. In practice, this...
in log file: {}.\n If needed, please reach out to tool support at: <EMAIL>, with your report and log file. \033[0;0m'.format(log_file_path)) log_file_logger.exception('{}\n'.format(e)) #26:Check:Cluster:Cluster health print(' #26:Checking:Cluster:Cluster health') log_file_logger.info('#26:Check:Cluste...
<filename>scifin/marketdata/simuldata.py # Created on 2020/7/22 # This module is for simulating market data. # Standard library imports from datetime import datetime from datetime import timedelta from typing import Union # Third party imports import matplotlib.pyplot as plt import numpy as np import pandas as pd im...
<filename>ROLL_ALONG_V2_1.py #!/usr/bin/env python # coding: utf-8 # In[1]: #Author: <NAME> # Setup Python ----------------------------------------------- # import random, os, glob, time, sys import pygame pygame.init() pygame.mixer.init() # Setup Pygame/Window & Variables ---------------------------- # HEIGHT = 65...
<filename>module_constants.py ############################################################## # These constants are used in various files. # If you need to define a value that will be used in those files, # just define it here rather than copying it across each file, so # that it will be easy to change it if you need to...
x: return np.nan return x def get_other_loc(x): if type(x) != str or x == 'none': return np.nan if ',' in x: split_str = x.split(',') return split_str[0].lower() else: return x.lower() def get_state_var(x): if x == 'none': return np.nan if type(x) == str: if ',' in x: new_list = x.split(',') state_...
OOOOOO 0x00, 0x42, 0x18, # O O OO 0x00, 0x4C, 0x18, # O OO OO 0x00, 0xFE, 0x08, # OOOOOOO O 0x83, 0xFE, 0x08, # O OOOOOOOOO O 0x83, 0x22, 0x08, # O OO O O O 0x80, 0x12, 0x08, # O O O O 0x40, 0x12, 0x18, # O O O OO 0x40, 0x1A, 0x30, # O OO O OO 0x60, 0x1B, 0xF0, # OO OO OOOOOO 0x30, 0x1B, 0xE0, # OO OO OOOO...
-> Any: ImageResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, odata_type: str, key_frame_interval: Optional[str] = None, label: Optional[str] = None, range: Optional[str] = None, start: Optional[str] = None, step: Optional[str] = None, stretch_mode: Optional[str] = None)...
call a lambda function that returns a constant value. May throw; this code is very hacky. """ info = InvokeDynamicInfo(ins, cf) # We only want to deal with lambdas in the same class assert info.ref_kind == REF_invokeStatic assert info.method_class == cf.this.name lambda_method = cf.methods.find_one( name=info....
""" Combat Manager. This is where the magic happens. And by magic, we mean characters dying, most likely due to vile sorcery. The Combat Manager is invoked by a character starting combat with the +fight command. Anyone set up as a defender of either of those two characters is pulled into combat automatically. Otherwis...
<reponame>DallasTrinkle/Onsager """ Unit tests for supercell class """ __author__ = '<NAME>' import unittest import itertools, copy import numpy as np import onsager.crystal as crystal import onsager.supercell as supercell class FCCSuperTests(unittest.TestCase): """Tests to make sure we can make a supercell object...
# -*- coding: utf-8 -*- if __name__ == "__main__": raise Exception("Test files can't be run directly. Use `python -m pytest greenery`") from greenery.lego import conc, mult, charclass, one, emptystring, star, plus, nothing, pattern, qm, d, multiplier, bound, w, s, W, D, S, dot, nomatch, inf, zero, parse, from_fsm fr...
fnames in walk.walk(srcdir, maxdepth=search_depth): for srcfname in fnames: if endswith_one_of_coll(srcfname, src_suffixes): match = re.match(checkfile_root_regex, srcfname) if match is None: eprint("No regex match for filename matching suffix criteria in source directory: {}".format(srcfname)) else: cf_root_nam...
index=multi_index, columns=columns) return out_df @register_class('AlignedDynamicTable', namespace) class AlignedDynamicTable(DynamicTable): """ DynamicTable container that subports storing a collection of subtables. Each sub-table is a DynamicTable itself that is aligned with the main table by row index. I.e., a...
<filename>src/main.py # import pyro from collections import defaultdict from torch.distributions import normal, poisson, binomial, log_normal, categorical, uniform import random from mpl_toolkits import mplot3d import numpy as np import matplotlib.pyplot as plt import torch as th from torch import nn # physical consta...
of the lithologic material identified at time of' ' drilling. E.g. Black, dark, tan, rust-coloured')) lithology_hardness = models.ForeignKey( LithologyHardnessCode, db_column='lithology_hardness_code', on_delete=models.PROTECT, blank=True, null=True, verbose_name='Hardness', db_comment=('The hardness of the mater...
can be called directly, which is the same as calling `validate`. For examples, see `NameValidator`. """ # Initial checks .............. if (names is None): if (nbfields is None): return None names = [] if isinstance(names, basestring): names = [names, ] if nbfields is not None: nbnames = len(names) if (nbn...
print('7_', 8) 7_ 8 """).strip() assert expected == result def test_heuristic_eval_1(): result = py("1+2") expected = dedent(""" [PYFLYBY] 1+2 3 """).strip() assert expected == result def test_heuristic_eval_concat_1(): result = py("5 + 7") expected = dedent(""" [PYFLYBY] 5 + 7 12 """).strip() assert...
# coding=utf-8 from OTLMOW.OEFModel.EMObject import EMObject from OTLMOW.OEFModel.EMAttribuut import EMAttribuut from OTLMOW.OTLModel.Datatypes.BooleanField import BooleanField from OTLMOW.OTLModel.Datatypes.DateTimeField import DateTimeField from OTLMOW.OTLModel.Datatypes.StringField import StringField # Generated w...
"masterSystemDiskCategory", "master_system_disk_size": "masterSystemDiskSize", "node_port_range": "nodePortRange", "num_of_nodes": "numOfNodes", "pod_vswitch_ids": "podVswitchIds", "proxy_mode": "proxyMode", "runtime": "runtime", "security_group_id": "securityGroupId", "service_cidr": "serviceCidr", "snat_entr...
import numpy as np from utils.string_helper import _make_n_gram from collections import Counter import torch from utils.pretrained_discriminator import SeqClassifyDiscriminator #from nltk.corpus import stopwords import textstat from utils.io import LEN_BINS_RANGE, LEN_BINS, n_gram_novelty_to_bin, ext_frag_density_to_bi...
adding empty entry to database") else: # log provided attributes for key, value in attributes.items(): logger.debug("attributes[" + str(key) + "]: " + str(value)) # Create object try: db_entry_object = Contacts( account_id=account_id, address1=str(attributes.get("address1", "")), address2=str(attributes.get(...
iterate to get both major and minor axes while axes_mass_dif > 0.005: # get 1-D radius along minor axis masks = (major_distances < galaxy_radius_major) galaxy_radius_minor, galaxy_mass_minor, indices = get_radius_mass_indices( masses[masks], minor_distances[masks], distance_scaling, distance_limits, distance_bin_...
""" Provide the nodes for the template engine. """ __author__ = "<NAME>" __copyright__ = "Copyright 2016" __license__ = "Apache License 2.0" __all__ = [ "Node", "NodeList", "TextNode", "IfNode", "ForNode", "SwitchNode", "EmitNode", "IncludeNode", "ReturnNode", "AssignNode", "SectionNode", "UseSectionNode", "ScopeN...
= load_cache(oci_utils.__chap_password_file) if chap_passwords is None: return None, None for iqn, unpw in chap_passwords.items(): if ocid == unpw[0]: return iqn, unpw[1] return None, None _this_instance_ocid = None def main(): """ Main. Returns ------- int Return value of the operation, if any. 0 oth...
"""Unit tests for classes implemented in cygraph/graph.pyx """ import os import pickle import numpy as np import pytest import cygraph as cg def test_constructor(): """Tests initialization of a StaticGraph and DynamicGraph objects. """ graphs = [] # Smoke tests. cg.graph() vertex_lists = [['s', 'e'], [0, 1...
<reponame>NREL/streamm-tools<filename>scripts/rdfg1.py #! /usr/bin/env python """ Radial distribution code length - Angstroms mass - AMU volume - Angstroms^3 # g_ij(r) = n_j(r_ij)/ (rho_j 4 pi r^2 dr ) g_ij(r) = n_j(r_ij)/ (rho_j 4/3 pi( r_out^3 - r_in^3) rho_j = N_j / V_ave g(r) = n(r) /( rho dV ) n(r) =...
<gh_stars>10-100 ''' python main_cast.py -a resnet50 --cos --lr 0.5 --batch-size 256 --dist-url 'tcp://localhost:10005' <ImageFolder> --mask-dir <MaskFolder> --crit-gcam cosine --alpha-masked 3 --second-constraint "ref" --output-mask-region "ref" --num-gpus-per-machine 8 --print-freq 10 --workers 8''' import argparse ...
Query Result @annotate def sqlite3_column_decltype(pStmt: sqlite3_stmt_p, n: c_int) -> c_char_p: pass # Evaluate An SQL Statement @annotate def sqlite3_step(pStmt: sqlite3_stmt_p) -> c_int: pass # Number of columns in a result set @annotate def sqlite3_data_count(pStmt: sqlite3_stmt_p) -> c_int: pass # Fundament...
i + 2 break elif i == len(mms_s_dist) - 1: k = 4 else: k = 2 # k Confirmation : Comparing k.cluster_centers_ dist # while True: km = KMeans(n_clusters=k) km = km.fit(inter_data) if k <= 2: break cluster_centroids = km.cluster_centers_[:, [1]] # print('cluster_centroids :', cluster_centroids) error_exi...
[]) self.assertEqual(ss.logger.exception_calls, []) self.assertEqual(ss.logger.txn, None) def test_log_request_additional_info_and_headers(self): env = self._log_request_build() env['brim.log_info'] = ['test:', 'one', 'two'] env['HTTP_CONTENT_TYPE'] = 'text/plain' ss = self._log_request_execute(env, log_headers...
:rtype: DetailedResponse """ if fromimage is None: raise ValueError('fromimage must be provided') if toimage is None: raise ValueError('toimage must be provided') headers = { 'Account': self.account } sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME, service_version='V1', operation_id='t...
####### Done by KiroTheBlueFox ######### # # # This is free to use # # You can redistribute it with proper # # credits (keep the credits) # # Do not claim it as your program ! # # Credits to me (in your mod) are # # very welcomed ! # # You can modify the program but keep # # these credits ! # # Please do not ...
<reponame>iuliansimion/Chevalley import sympy class Curtis: type = 0 # module for computing zUy and UxU deodhar = 0 # Bruhat form bruhat = 0 # the Chevalley group group = 0 # the Weyl group weyl = 0 # standard parabolics para = 0 # distinguished expressions for standard parabolics dist_expr_p = 0 # De...
# coding=utf-8 # Copyright 2021 The Google Research 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 l...
<reponame>kemerelab/ghostipy import numpy as np from abc import ABC, abstractmethod from numba import njit from scipy.signal import correlate __all__ = ['Wavelet', 'MorseWavelet', 'AmorWavelet', 'BumpWavelet'] def reference_coi(psifn, reference_scale, *, threshold=1/(np.e**2)): """ Estimates a wavelet's cone of ...
= [0.973, 0.553] tr_sur_tv = [0.915, 0.797010362, 0.705988294, 0.724, 0.964, 0.970, 0.952, 0.955, 0.539] admm_sur_tv = [0.957, 0.790725327, 0.683639638, 0.734, 0.979, 0.973, 0.955, 0.918, 0.715] tr_st_tv = [0, 0.830134194, 0.669190782, 0.987, 0.951] admm_st_tv = [0, 0.622728045, 0.669190782, 0.865, 0.001] width =...
need be if not os.path.exists(cachedir): # make cachdir if not exist os.mkdir(cachedir) if not os.path.isdir(cachedir): # is not a directory logging.error("%s is not a directory, exiting...", cachedir) sys.exit(1) # # Trigger an update based on whether the interval (tstart,tstop) # is covered in the existing ca...
* wt residual = (mtb - tb) / tb_err return residual class RegionSelector: # def set_errorobj(self, xout, yout, errobj, yerr): # eospec, dummy, (errbar_eospec,) = errobj # eospec.set_data(xout, yout) # if yerr is not None: # yerr_top = yout + yerr # yerr_bot = yout - yerr # new_segments_y = [np.array([[x, yt...
# by amounra 0714 : http://www.aumhaa.com from __future__ import with_statement import Live import math import sys #from re import * import re from itertools import imap, chain, starmap """ _Framework files """ from _Framework.ButtonElement import ButtonElement from _Framework.ButtonMatrixElement import ButtonMatrixE...
"""This modules provides functionality in order to seed database.""" import asyncio import logging import gino from app.db import get_database_dsn LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) LOGGER.addHandler(ch) insert_mcc_categori...
"description": "Store a float into local variable 2", "inputs": [OperandType.Float], "outputs": [], }, 0x46: { "name": "fstore_3", "description": "Store a float into local variable 3", "inputs": [OperandType.Float], "outputs": [], }, 0x47: { "name": "dstore_0", "description": "Store a double into local vari...
""" Created on Dec 7, 2016 @author: <NAME> <EMAIL> """ import sys, re, os.path import time import shutil ''' StringSeparators is the default list of characters that are used to separate names in a string representation of a list of names. The following list is comma,space,semi-colon,colon ''' StringSeparators ...
# # Copyright 2017 Red Hat Inc. # # 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 ...
<reponame>adambiser/agk-steam-plugin """ A script to download the apartment prices for Camden Foxcroft and store them in a CSV file. """ from bs4 import BeautifulSoup import os import re import requests OUTPUT_FILENAME = "steam_constants.agc" JSON_H_OUTPUT_FILENAME = "ToJSON.h" JSON_CPP_OUTPUT_FILENAME = "ToJSON.cpp"...
<filename>pipeline.py<gh_stars>0 import base64 import collections import functools import gzip import inspect import itertools import json import os import re import traceback import typing import conducto.internal.host_detection as hostdet from .shared import constants, log, types as t from . import api, callback, im...
ocean along x [W m-1] if ( "utau" in ncU.data_vars ): TAUX = ncU.utau elif ( "sozotaux" in ncU.data_vars ): TAUX = ncU.sozotaux else: print(' WARNING : No data found for TAUX --> filled with NaNs') TAUX = xr.DataArray( np.zeros((mtime,my,mx))*np.nan, dims=['time', 'y', 'x'] ) # surface stress received by the o...
'b'], ['permanente', 'noun', 'b'], ['permesso', 'past_part', 'b'], ['permesso', 'adjective', 'b'], ['permesso', 'noun', 'b'], ['permettere', 'verb', 'a'], ['pero', 'noun', 'c'], ['però', 'conjunction', 'a'], ['perpendicolare', 'adjective', 'c'], ['perpendicolare', 'noun', 'c'], ['perplesso', 'adjective', 'b'], ['perqui...
<gh_stars>100-1000 # encoding: utf-8 # module Grasshopper.Kernel.Graphs calls itself Graphs # from Grasshopper,Version=1.0.0.20,Culture=neutral,PublicKeyToken=dda4f5ec2cd80803 # by generator 1.145 """ NamespaceTracker represent a CLS namespace. """ # no imports # functions def GH_GraphProxyObject(n_owner): #...
<reponame>jordan-melendez/gp_project<gh_stars>0 from functools import reduce from itertools import cycle, zip_longest import numpy as np import scipy as sp from scipy.stats import multivariate_normal ################################################################# # Based on functions defined in Yunus Saatci's Thesi...
<gh_stars>1-10 #!/usr/bin/env python # # xnatbrowser.py - The XNATBrowserPanel class. # # Author: <NAME> <<EMAIL>> # """This module provides the :class:`XNATBrowserPanel`, a ``wx`` panel which allows the user to connect to an XNAT server, and browse the projects and files contained on it. The ``xnatpy`` library is used...
""" Contains the base Exposure and Filename classes. """ import datetime import json import os import threading import time from typing import List, Optional, Union import azcam import numpy from azcam.tools.console_tools import ConsoleTools from azcam.tools.exposure_filename import Filename from azcam.tools.exposure...
-1, -3] intimidations -1.4 1.49666 [1, -2, -2, -2, -1, -1, -1, -4, 1, -3] intimidator -1.6 0.4899 [-1, -1, -2, -2, -1, -2, -2, -1, -2, -2] intimidators -1.6 0.8 [-1, -1, -3, -2, -1, -1, -3, -1, -2, -1] intimidatory -1.1 1.22066 [-1, -2, -3, -1, -1, -1, -2, 2, -1, -1] intricate 0.6 0.66332 [1, 0, 2, 1, 0, 1, 1, 0, 0, 0]...
from collections import OrderedDict from hwtypes import BitVector import os from ..bit import VCC, GND, BitType, BitIn, BitOut, MakeBit, BitKind from ..array import ArrayKind, ArrayType, Array from ..tuple import TupleKind, TupleType, Tuple from ..clock import wiredefaultclock, wireclock, ClockType, Clock, ResetType, C...
# -*- coding: UTF-8 -*- ''' Created on 4 nov. 2014 @author: <NAME> Written By: <NAME> @Email: < robert [--DOT--] pastor0691 (--AT--) orange [--DOT--] fr > @http://trajectoire-predict.monsite-orange.fr/ @copyright: Copyright 2015 <NAME> This program is free software; you can redistribute it and/or modify ...
<filename>test/py/ganeti.hypervisor.hv_kvm_unittest.py #!/usr/bin/python # # Copyright (C) 2010, 2011 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of sourc...
import mltk import os from explib.eval_methods import get_best_f1, get_adjusted_composite_metrics from algorithm.utils import GraphNodes, get_data, time_generator, get_sliding_window_data_flow, get_score, \ get_avg_recons import tfsnippet as spt import tensorflow as tf from tqdm import tqdm from algorithm.InterFusion...