input
stringlengths
2.65k
237k
output
stringclasses
1 value
<filename>io_scene_xray/level/exp.py # standart modules import os import math import struct # blender modules import bpy import bmesh import mathutils # addon modules from . import fmt from .. import text from .. import utils from .. import log from .. import version_utils from .. import xray_io from .. import ogf ...
mask @property def flow_direction(self): """The information necessary to move any variable laterally (i.e. along Y and/or X) to its nearest receiving neighbour in the `Grid` given as a `cf.Field` and returned as a processed `numpy.ndarray`. :Parameters: directions: `cf.Field` The field containing flow direc...
<reponame>HQSquantumsimulations/pyquest """Measurement function in PyQuest-cffi""" # Copyright 2019 HQS Quantum Simulations GmbH # # 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...
default=(objects.collection_manager.CollectionIdentifier.Unindentified), invalid_enums=( objects.collection_manager.CollectionIdentifier.Unindentified,))), locked_args={'test_type': COLLECTION_TYPE}), specific_items=TunableTuple(description='\n If selected we will check that the collected item is from a\n specific ...
sep dump += 'Flow IAT Std' dump += sep dump += 'Flow IAT Max' dump += sep dump += 'Flow IAT Min' dump += sep dump += 'Fwd IAT Tot' dump += sep dump += 'Fwd IAT Mean' dump += sep dump += 'Fwd IAT Std' dump += sep dump += 'Fwd IAT Max' dump += sep dump += 'Fwd IAT Min' dump += sep dump += 'Bwd IAT Tot...
<filename>metalibm_core/code_generation/generators/llvm_ir_code_generator.py # -*- coding: utf-8 -*- ############################################################################### # This file is part of metalibm (https://github.com/kalray/metalibm) #####################################################################...
dfn(3.)) def test_holomorphic_jacrev_of_float_errors(self): dfn = jacrev(lambda x: x ** 2, holomorphic=True) self.assertRaisesRegex( TypeError, (r"jacrev with holomorphic=True requires inputs with complex dtype, " r"but got float.*"), lambda: dfn(3.)) def test_holomorphic_jacfwd_of_float_errors(self): dfn = ...
from schematics import Model from schematics.types import ModelType, ListType, StringType, IntType, BooleanType, NumberType, DateTimeType, \ TimestampType, UTCDateTimeType, TimedeltaType, FloatType class Tags(Model): key = StringType(serialize_when_none=False) value = StringType(serialize_when_none=False) class ...
<reponame>gieses/xiRT """Module to build the xiRT-network.""" import os import numpy as np import pandas as pd import tensorflow as tf import tensorflow_addons as tfa import yaml from tensorflow.keras import backend as K from tensorflow.keras import losses from tensorflow.keras import regularizers, optimizers from ten...
== u"○" if self.invert: success = not success if success: return u"%sが【%s】である" % (s, s2) else: return u"%sが【%s】でない" % (s, s2) class BranchGossipContent(BranchContent): def __init__(self, data): BranchContent.__init__(self, data) self.gossip = self.data.get("gossip", "") self.spchars = self.data.g...
# -*- encoding: utf-8 -*- # Copyright 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
__init__(self, *args, **kwargs): """ See also -------- `~proplot.subplots.subplots`, `Axes` """ # Set tick length to zero so azimuthal labels are not too offset # Change default radial axis formatter but keep default theta one super().__init__(*args, **kwargs) formatter = axistools.Formatter('auto') self.yaxi...
<filename>pynrm/aoinstrument.py # -*- coding: utf-8 -*- """Useful utilities that are not telescope-dependent. """ import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import astropy.io.fits as pyfits import csv class AOInstrument: """The AOInstrument Class """ #A blank dictionary on startu...
#! usr/bin/python3.6 """ Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-07-06 14:02:20.222384 .. warning:: The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus hel...
<reponame>jpapadakis/gdal #!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsizip/vsimem/ # Author: <NAME> <even dot rouault at spatialys.com> # #########################################...
price_df = self._get_price_df() return self._get_data_list(multivariate_df=price_df) def _get_price_return_df_list(self): price_return_df = self._get_price_return_df() return self._get_data_list(multivariate_df=price_return_df) def _get_data_list(self, multivariate_df: pd.DataFrame): """ Returns a list of Data...
= None self.systemTags = OptionalList() self.userTags = OptionalList() APIQUERYVOLUMESNAPSHOTREPLY_FULL_NAME = 'org.zstack.header.storage.snapshot.APIQueryVolumeSnapshotReply' class APIQueryVolumeSnapshotReply(object): FULL_NAME='org.zstack.header.storage.snapshot.APIQueryVolumeSnapshotReply' def __init__(self): ...
# -*- coding: utf-8 -*- # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
via http. """ global director_service_thread if director_service_thread is not None: print(LOG_PREFIX + 'Sorry: there is already a Director service thread ' 'listening.') return # Create server server = xmlrpc_server.SimpleXMLRPCServer( (demo.DIRECTOR_SERVER_HOST, demo.DIRECTOR_SERVER_PORT), requestHandle...
: xr.DataArray Numbers to round. p : int, optional A positive number specifies the number of digits after the decimal point to round to. A negative number means rounding to a power of ten, so for example -2 rounds to the nearest hundred. Defaults to 0. Returns ------- xr.DataArray : The rounded numbers. """ ...
<reponame>deepsphere/deepsphere-weather<filename>modules/xscaler.py #!/usr/bin/env python3 """ Created on Mon Dec 14 13:25:46 2020 @author: ghiggi """ import xarray as xr import numpy as np import os import time # import xscaler # xscaler.GlobalScaler.MinMaxScaler # xscaler.GlobalScaler.StandardScaler ...
headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: float or ClientRawResponse if raw=true :rtype: float or ~msrest.pipeline.ClientRawResp...
Sec. 9.4.1 of Faltinsen 2005. """ if runGeoLengths: self.get_geo_lengths() #Calculated wetted lengths in get_eom_matrices() W = self.weight U = self.speed rho = self.rho b = self.beam lcg = self.lcg tau = self.tau beta = self.beta g = self.g r_g = self.r_g eta_5 = self.eta_5 L_K = self.L_K L_C = se...
is not empty inmarkup = str(input("Insert markup: ")) markup = re.sub('[^A-Za-z0-9:]+', '', inmarkup) print(markup) print("---") list_markup.append(add_markup(obj_cursor.pozicija, markup, obj_cursor.trajanje, 0)) # if list_chords: # for i in list_chords: # if i.pozicija >= obj_cursor.pozicija: # i.pozicija += ...
#! /usr/bin/env python import logging import threading import time import traceback from urllib import urlopen from autopyfactory.interfaces import WMSStatusInterface, _thread from autopyfactory.info import WMSStatusInfo from autopyfactory.info import WMSQueueInfo from autopyfactory.info import SiteInfo from autopyf...
#!/usr/bin/env python import datetime import json import os import os.path import shutil import sys import traceback from distutils import log from distutils.command.build import build as BuildCommand from distutils.core import Command from subprocess import check_output from setuptools import find_packages, setup fro...
set of baseIds for the component instances here. @param components: List of Component object instances with baseId, window, and max window size set @return: List of tuples of form (instance name, base id, window size) """ # Assign the assembly baseId and window size or use default if none exists if assembly_base_i...
#!/usr/bin/env python """ Artificial Intelligence for Humans Volume 3: Deep Learning and Neural Networks Python Version http://www.aifh.org http://www.jeffheaton.com Code repository: https://github.com/jeffheaton/aifh Copyright 2015 by <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you...
self.assertEquals('bad_url', dos.get_url_domain('192.168.0.1')) def testCaching(self): """Tests that cache eviction works properly.""" dos._DOMAIN_CACHE.clear() old_size = dos.DOMAIN_CACHE_SIZE try: dos.DOMAIN_CACHE_SIZE = 2 dos._DOMAIN_CACHE['http://a.example.com/stuff'] = 'a.example.com' dos._DOMAIN_CACHE['...
# (C) <NAME> and Carnegie Mellon University, 2017 import logging import time from tensorlog import comline from tensorlog import config from tensorlog import declare from tensorlog import funs from tensorlog import matrixdb from tensorlog import ops from tensorlog import util conf = config.Config() conf.reparameteri...
<filename>Arty-Z7-10/components/ext_sources/u-boot-ectf/test/py/tests/test_mmc.py # # Copyright (c) 2016 <NAME> # # SPDX-License-Identifier: GPL-2.0 import pytest import random import re import u_boot_utils mmc_set_up = False controllers = 0 devices = {} @pytest.mark.buildconfigspec("cmd_mmc") def test_mmc_list(u_bo...
""" Copyright (c) <NAME> All rights reserved. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,...
E501 # verify the required parameter 'parameter_name' is set if ('parameter_name' not in params or params['parameter_name'] is None): raise ValueError("Missing the required parameter `parameter_name` when calling `get_step_parameter`") # noqa: E501 collection_formats = {} path_params = {} if 'bt_locator' in pa...
<filename>sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/_models_py3.py<gh_stars>1-10 # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the p...
# -*- coding: utf-8 -*- from src.browser import Browser from src.constants import * from src.exceptions import RetryException from src.secret import USERNAME, PASSWORD, TRANS_USERNAME, TRANS_PASSWORD from datetime import datetime from functools import wraps, partial from hashlib import md5 import json import os from ...
'maturity_index', 'messages', 'needs', 'nosy', 'numeric_effort', 'part_of', 'planned_begin', 'planned_end', 'priority', 'release', 'responsible', 'safety_level', 'severity', 'status', 'superseder', 'test_level', 'title'] only) External users are allowed to access issue if they are on the list of allowed external users...
SINGLE': 121217, 'SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE ALTERNATING': 121222, 'SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE DOUBLE': 121221, 'SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE SINGLE': 121220, 'SIGNWRITING TRAVEL-FLOORPLANE SHAKING': 121223, 'SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL DOUBLE'...
<reponame>MishaRubanov/SchulmanLab<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Wed May 6 15:12:23 2020 @author: sscha """ import numpy as np import copy import scipy.integrate as spi from sympy import symbols, Matrix, Transpose, matrix_multiply_elementwise as MME import networkx as nx import matplotl...
element Number of such [0,1,2,3] elements is equal to the number of defined conductor cells in geometry ''' # Let's check the size of the array elementsInY = inputArray.shape[0] elementsInX = inputArray.shape[1] # lets define the empty vectorArray vectorArray = [] # lets go for each input array position an...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status...
source language of shape `(batch, src_len)` src_lengths (torch.LongTensor): lengths of each source sentence of shape `(batch)` Returns: dict: - **encoder_out** (Tensor): the last encoder layer's output of shape `(src_len, batch, embed_dim)` - **encoder_padding_mask** (ByteTensor): the positions of padding ele...
file_name) return None self.add_cached_array_to_imported_list(import_array, file_name, keyword, discrete = discrete, uom = uom, time_index = time_index, null_value = null_value, property_kind = property_kind, local_property_kind_uuid = local_property_kind_uuid, facet_type = facet_type, facet = facet, real...
Sorry about that.') return redirect("leaders_interfaces:courses") except LessonNotFoundException: messages.error(request, 'An error has occurred (^・x・^). We cannot find the lesson you asked for! Sorry about that.') return redirect("leaders_interfaces:courses_lessons", course_id) # Get all associated learning_res...
old =time.time() global callback_queue tid = threading.currentThread() callback_queue[tid] = False # while (compare_and_swap(0, 1) == 1): # debug_probe_string = "CALLBACK_PROBE : " + kernel.name + " " + str(device) + " " + str( # event_type) + " event" # logging.debug(debug_probe_string) #boltLock.acquire() ...
if kind == 'batchmodify': return self._render_batched_timeline_event(context, field, event) ticket, verb, info, summary, status, resolution, type, \ description, component, comment, cid = event[3] if field == 'url': href = context.href.ticket(ticket.id) if cid: href += '#comment:' + cid return href el...
""" :title: HLSPFile.py :author: <NAME> :contact: <EMAIL> The class defined here can be used to construct a file to track information about a High-Level Science Product that will be needed for various stages of HLSP ingestion to MAST and CAOM. Methods are also provided to add new information, update existing parameter...
self.AssetIpAll = params.get("AssetIpAll") self.AssetType = params.get("AssetType") self.PublicIpAddresses = params.get("PublicIpAddresses") self.PrivateIpAddresses = params.get("PrivateIpAddresses") self.SoarResponseStatus = params.get("SoarResponseStatus") self.SoarResponseTime = params.get("SoarResponseTime") ...
<gh_stars>10-100 strong_affirmatives = ["yes", "yeah", "always", "all", "any", "every", "everybody", "everywhere", "ever"] strong_negations = ["no", "not", "never", "none" "n't", "nothing", "neither", "nobody", "nowhere"] punctuation = ["?", "!", "..."] interjections = ["oh", "hey", "wow", "aha", "aham", "aw", "bam"...
import torch import torch.nn as nn import torch.nn.functional as functional import numpy as np class STLoss(nn.Module): def __init__(self, ignore_index=-1, num_class=19, deque_capacity_factor=2.0, feat_channel=2048, device='cuda'): super(STLoss, self).__init__() if num_class == 19: # GTA5 self.BG_LABEL = [0, 1,...
or self.options.private_members: ret.append((membername, member, isattr)) return ret def format_name(self) -> str: """Format the name of *self.object*. This normally should be something that can be parsed by the generated directive, but doesn't need to be (Sphinx will display it unparsed then). For things li...
par : ndarray Kernel parameters. args[0] : ndarray Function observations. Returns ------- : float Expected model variance. """ fcn_obs = np.squeeze(args[0]) if self.estimate_par: # re-compute EMV if kernel parameters are being estimated iK = self.kernel.exp_x_kxkx(par, par, self.points) scale = (self.nu...
# encoding:utf-8 ''' 解析数据,生成训练数据 Copyright (C) 2018 <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 ...
from sklearn.datasets import fetch_mldata from sklearn.datasets import fetch_openml import pickle import numpy as np from PIL import Image import os import sys import h5py import time import json import threading as th from params import path_cifar10, path_cifar100, path_fmow_rgb, path_catch_files, fmow_category_names...
""" Module for managing configuration data from `config.json` """ import copy import json import numbers import os from typing import Any, Dict, Iterable, List, Optional, Union ConfigDict = Dict[str, Union[str, int, float]] class SHConfig: # pylint: disable=too-many-instance-attributes """A sentinelhub-py package ...
{ } }, 'srcPortDist': { 'min': { }, 'max': { }, 'type': { } }, 'rampUpProfile': { 'min': { }, 'max': { }, 'increment': { }, 'interval': { }, 'type': { } }, 'delayStart': { }, 'rampDist': { 'upBehavior': { }, 'down': { }, 'steadyBehavior': { }, 'downBehavior': { }, 'up': { }, 'synRetr...
#!/usr/bin/env python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: <EMAIL> # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops = ...
<reponame>we-taper/quantum<gh_stars>1-10 # Copyright 2020 The TensorFlow Quantum Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licens...
<gh_stars>0 # built in modules import random import argparse import typing import itertools import os import sys import zipfile # installed modules import tqdm import dgl import mxnet as mx import numpy as np import gluonnlp as nlp from mxnet import gluon from mxnet.gluon import HybridBlock import mxnet.autograd # pr...
<reponame>Hritikbansal/MultivariateTimeSeries_Generalization<filename>src/pmsm/train.py import argparse import torch import utils import datetime import os import pickle import random import numpy as np import logging from torch.utils import data from torch import nn import mts_model import sys import helper parser...
kp=Nz//2 # ax4.clear() # note: maxind will be used in the vertical cross sections if btype == 'w': # not supported ax4.contourf( xb[kp,:,:], yb[kp,:,:], b[kp,:,:] + Bb[kp,:,:] , blevs, zorder=1) maxind = np.unravel_index( np.argmax(b[kp,:,:] , axis=None), b[kp,:,:].shape) elif btype =='c': cmid = 0.5*(c[kp...
import contextlib import fnmatch import glob import logging import os from pathlib import Path import pkg_resources import re import shutil import shlex import subprocess import sys import tempfile import threading import time import functools import jellyfish import pexpect import requests import termcolor from . im...
<filename>scripts/runransac.py #!/usr/bin/env python3 import numpy as np from numba import cuda, float32, float64, uint16, int32 # GPU Optimizations from numba.cuda.random import create_xoroshiro128p_states, xoroshiro128p_uniform_float32 import math import copy # My Classes import libfileio as my_io import libtimer a...
if(verbose) : print('image too small for cropping (validation) : ', data[1] + '/' + data[0]) else : break if crop: # crop image if rand_crop: crop_width = random.randint(0, image.size[0]-self.size-1) crop_height = random.randint(0, image.size[1]-self.size-1) else: crop_width = 0 crop_height = 0 box = ...
<filename>src/baskerville/models/base_spark.py # Copyright (c) 2020, eQualit.ie inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import json import datetime import itertools import os from baskerville.model...
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import builtins import math import os import random import shutil import time import warnings from tqdm import tqdm import pandas as pd import torch import torch.nn as nn import torch.nn.parallel import torch.b...
self._expand( active_ctx, active_property, e, options, inside_list=inside_list, inside_index=inside_index, type_scoped_ctx=type_scoped_ctx) if inside_list and _is_array(e): e = {'@list': e} # drop None values if e is not None: if _is_array(e): rval.extend(e) else: rval.append(e) return rval # handle scal...
#!/usr/bin/python ## # @file # This file is part of SeisSol. # # @author <NAME> (rettenbs AT in.tum.de, http://www5.in.tum.de/wiki/index.php/Sebastian_Rettenberger,_M.Sc.) # # @section LICENSE # Copyright (c) 2013, SeisSol Group # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
55),1] X50 = M[(M[:,0] < 50),2:] y50 = M[(M[:,0] < 50),1] X80p_Sim = M_sim[(M_sim[:,0] >= 80),1:] X75_80_Sim = M_sim[(M_sim[:,0] >= 75) & (M_sim[:,0] < 80),1:] X70_75_Sim = M_sim[(M_sim[:,0] >= 70) & (M_sim[:,0] < 75),1:] X65_70_Sim = M_sim[(M_sim[:,0] >= 65) & (M_sim[:,0] < 70),1:] X60_65_Sim = M_sim[(M_sim[:,0] >=...
<filename>src/ny_artsy_date/ny_artsy_date.py<gh_stars>1-10 import googlemaps import os import numpy as np import requests import lxml import pandas as pd import gmaps from pandas import json_normalize import re def geocoding(my_location, google_maps_key): """ Function to obtain latitude and longitude as needed given...
<filename>phobos/utils/editing.py #!/usr/bin/python3 # coding=utf-8 # ------------------------------------------------------------------------------- # This file is part of Phobos, a Blender Add-On to edit robot models. # Copyright (C) 2020 University of Bremen & DFKI GmbH Robotics Innovation Center # # You should hav...
= var055_tangent_b_z f_log_intermediate[56] = var056_tangent_b_y f_log_intermediate[57] = var057_tangent_t_z f_log_intermediate[58] = var058 f_log_intermediate[59] = var059 f_log_intermediate[60] = var060 f_log_intermediate[61] = var061 f_log_intermediate[62] = var062 f_log_intermediate[63] = var063 f...
5)) + 2) / 2 def_ = ((random.randint(1, 5)) + 3) / 2 spd = ((random.randint(0, 6)) + 7) / 2 class_w = float(9) print("And the stats are:", atk, "attack", def_, "defense", "and", spd, "speed") print(" ") time.sleep(.25) if clase == 6: print("So, a healer, got it!") print(" ") clase_str = "healer" time.sleep(....
import os import re import glob import numpy as np import matplotlib.pylab as plt import matplotlib from scipy.spatial import ConvexHull from scipy.interpolate import interp1d from itertools import chain, count from collections import defaultdict from os import makedirs from os.path import isdir, isfile,...
<gh_stars>1-10 #!/usr/bin/env python """ Spherical Brain Mapping of 3D Brain Images. 3D brain imaging, such as MRI or PET produces a huge amount of data that is currently analysed using uni or multivariate approaches. The main aim of SBM is to provide a new framework that allows the mapping of a 3D brain image to a...
<reponame>okazaki2007/Proyecto-final_Jeff-Juan-david """ ********************************************************** * * * Instituto Tecnológico de Costa Rica * * Área Académica de Ing. en Computadores * * * * Desarrollo de juego simple con Python * * * * Estudiantes: * * <NAME>-2019044684 * * <NAME> - 202101...
from collections import defaultdict, namedtuple from dataclasses import dataclass import distutils.util import functools import itertools import json import math import operator import os import random import uuid import shutil import logging import time from typing import List, Dict, NamedTuple, Optional from django...
'g3', 'g0')] = 4 conflict_table[('g2', 'x', 'g3', 'g1')] = 4 conflict_table[('g2', 'x', 'g3', 'x')] = 0 conflict_table[('g2', 'x', 'x', 'g0')] = 2 conflict_table[('g2', 'x', 'x', 'g1')] = 2 conflict_table[('g2', 'x', 'x', 'g3')] = 0 conflict_table[('g3', 'g0', 'g1', 'g2')] = 6 conflict_table[('g3', 'g0', 'g1', '...
<reponame>ma-kast/AMfe # # Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS, # BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, <EMAIL>. # # Distributed under 3-Clause BSD license. See LICENSE file for more information. # """ Module for updating bas...
<filename>main backup.py import pygame from pygame.locals import * # from socket import * # from threading import Thread import tj import json # import pickle import time import sys # import random import tj # import zlib # USER CHANGABLE CONSTANTS # AQUIRING CONSTANTS ---------------------------------------- D = { ...
ax[0].set_title(f'Band {band} Subband {sb}') if subband_plot_with_slow: ff = np.arange(-3, 3.1, .05) rr, ii = self.eta_scan(band, sb, ff, 10, write_log=False) dd = rr + 1.j*ii sbc = self.get_subband_centers(band) ax[1].plot(ff+sbc[1][sb], np.abs(dd)/2.5E6) if save_plot: pna = plotname_append save_name = f'{t...
form=BlobEditForm(request.POST) # metadata = DMetadata.load_by_uuid(uuid=UUID, coldoc=coldoc) env = metadata.environ from ColDoc.utils import tree_environ_helper teh = tree_environ_helper(blobs_dir = blobs_dir) ## https://docs.djangoproject.com/en/dev/topics/forms/ a = teh.list_allowed_choices(env) form.fields[...
from lib.nodes import RootNode, TextNode, PartialNode, SectionNode, Node from lib.misc import TYPES, type_of, evalf, format_value, is_array from lib.directives import DIRECTIVES, SYMBOLS from lib.template import Template from lib.domain import Domain import json DEFAULT = { "error_on_func_failure": False, "eval_ze...
<reponame>Daymorn/StealthUO-Scripts from __future__ import division import datetime as _datetime import struct as _struct import time as _time from os import linesep as _linesep from ._datatypes import * from ._protocol import EVENTS_NAMES as _EVENTS_NAMES from ._protocol import ScriptMethod as _ScriptMethod from ._...
at least one must be thermostated. is_thermostated = False if isinstance(integrator, openmm.CompoundIntegrator): for integrator_id in range(integrator.getNumIntegrators()): _integrator = integrator.getIntegrator(integrator_id) is_thermostated = is_thermostated or self._is_integrator_thermostated(_integrator) else...
resource represents a long-running operation that is the result of a network API call. Messages: MetadataValue: Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method th...
<filename>src/rogerthat/bizz/service/mfd/sub.py<gh_stars>0 #!/usr/bin/env python # @@xxx_skip_license@@ # @PydevCodeAnalysisIgnore # # Generated Tue Nov 6 11:26:05 2018 by generateDS.py version 2.29.24. # Python 3.7.0 (default, Jul 23 2018, 20:22:55) [Clang 9.1.0 (clang-902.0.39.2)] # # Command line options: # ('-f', ...
<gh_stars>1000+ #!/usr/bin/env python3 import sqlite3, re, cgi, os, sys import pandas as pd # Configurable Setting ReportsDirectory = "./" # End if not os.path.exists(ReportsDirectory): os.makedirs(ReportsDirectory) DB = "" try: DB = sys.argv[1] except IndexError: DB = "" if len(DB) < 1: print("Usage: python ...
self.res_layer_5 = nn.Sequential( resnet.Bottleneck(2048, 256, 256, 1, True, 2, 1, nn.BatchNorm2d), resnet.Bottleneck(256, 256, 256, 1, True, 1, 1, nn.BatchNorm2d), resnet.Bottleneck(256, 256, 512, 1, True, 1, 1, nn.BatchNorm2d), ) self.res_layer_6 = nn.Sequential( resnet.Bottleneck(512, 256, 256, 1, True, 2, 1, ...
isinstance(tensor_in, tuple): tensor_in = tensor_in[0] with tf.variable_scope("deconv_bn_relu1_"+str(layer)) as scope: bn = deconv_bn1(tensor_in, 0, params, mtrain) tensor_out = relu1(bn, 0, params, mtrain) return tensor_out def conv_bn_relu_max_pool1(tensor_in=None, layer=0, params=None, mtrain=None): if ...
""" Peg Solitaire Puzzle Implementation Author: <NAME>, <NAME> This program implements the peg solitaire game for 3 different game boards. Solvability is not guaranteed on at least one...yet. The program used the following websites to create its base code. # Example program to show using an array to back a grid on-s...
from typing import Optional, Tuple import numpy as np from . import c_radavg2 def radavg(data: np.ndarray, dataerr: Optional[np.ndarray], mask: Optional[np.ndarray], wavelength: float, wavelength_err: float, distance: float, distance_err: float, pixelsize: float, pixelsize_err: float, center_row: float, center_...
# Copyright 2022 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 # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, softwar...
"""pysemver: Semantic Version comparing for Python. Provides comparing of semantic versions by using SemVer objects using rich comperations plus the possibility to match a selector string against versions. Interesting for version dependencies. Versions look like: "1.7.12+b.133" Selectors look like: ">1.7.0 || 1.6.9+b....
from itertools import combinations from typing import List import numpy as np from extremitypathfinder.helper_classes import AngleRepresentation, PolygonVertex # TODO numba precompilation of some parts possible?! do line speed profiling first! speed impact def inside_polygon(x, y, coords, border_value): # should r...
# This behavior is not seen with a single return token (see testRepeater5 directly below.) second = pp.matchPreviousExpr(first) expr = first + bridge.suppress() + second tst = "aaa ddd 12 aaa ddd" expected = [["aaa", "ddd"], ["aaa", "ddd"]] result = expr.parseString(tst) print(result.dump()) self.assertParseR...
"\u0648", "\u0648\u0633\u0637\u0650", "\u0648\u0642\u062a\u064a", "\u0648\u0642\u062a\u06cc\u06a9\u0647", "\u0648\u0644\u06cc", "\u0648\u064a", "\u0648\u06af\u0648", "\u064a\u0627", "\u064a\u0627\u0628\u062f", "\u064a\u0643", "\u064a\u0643\u062f\u064a\u06af\u0631", "\u064a\u0643\u064a", "\u0651\u0647", "\u...
#################### # # Copyright (c) 2018 Fox-IT # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge...
# -*- coding: utf-8 -*- import logging import numpy import itertools from interact import __module__ from interact.core.helpers import set_contact_type from interact.core.geometry import plane_fit, distance, angle, projection, vector_angle from interact.interactions.utils import is_pication logger = logging.getLogge...
<filename>jks/bks.py<gh_stars>10-100 # vim: set et ai ts=4 sts=4 sw=4: import struct import hashlib from pyasn1.codec.ber import decoder from pyasn1_modules import rfc5208, rfc2459 from Cryptodome.Hash import HMAC, SHA from .util import * from .jks import KeyStore, TrustedCertEntry from . import rfc7292 ENTRY_TYPE_C...
<reponame>alexander-bauer/awx # -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'JobHostSummary', fields ['jo...