input
stringlengths
2.65k
237k
output
stringclasses
1 value
<filename>zonarPy/read_sat.py<gh_stars>0 """ Created on Mon Nov 18 09:30:05 2019 @author: sveng """ #SAT file reader import pandas as pd import time import numpy as np from astral import Astral def read_sat(fn): """ read sat file, the information send via satellite during the voyage Parameters ---------- fn :...
#!/usr/bin/env python # Edit this script to add your team's training code. # Some functions are *required*, but you can edit most parts of the required functions, remove non-required functions, and add your own functions. ################################################################################ # # Imported fu...
<filename>datastructures.py import dataclasses from typing import Dict, Any @dataclasses.dataclass class KenPom: """Lightweight wrapper around all available KenPom stats.""" rank: int name: str conf: str record: str eff_margin: float offense: float off_rank: int defense: float def_rank: int tempo: float ...
''' // Copyright (c) 2015 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 agr...
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompany...
# Databricks notebook source # MAGIC %md # MAGIC # CCU013_08 Paper subset data to cohort # MAGIC # MAGIC **Description** # MAGIC # MAGIC This notebook subsets the covid trajectory, severity and events tables to the cohort used for the phenotype severity paper. # MAGIC # MAGIC **Project(s)** CCU0013 # MAGIC # MAGIC...
which case, add the gate in the next (new) time moment. * `next` - add the gate in the next (new) time moment. Returns: ``self`` - for chaining """ return self.add_gate(gate=Gate.Rx2T, qubits=(qubit, ), **kwargs) def CX(self, qubitA, qubitB, **kwargs): """ Add a CX gate to ``self`` at specified qubits and ti...
<filename>cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/CreateNatlTCVZoneGroups.py ## ---------------------------------------------------------------------------- # This software is in the public domain, furnished "as is", without technical # support, and with no warranty, express or implied, as to i...
scoreVal = float(cellResults[i][scoreOption]) except TypeError: scoreVal = 0.0 if (scoreVal > vectorThreshold): hotFile = cellResults[i]["image"] hotCoords = rasterMap[hotFile[:-4]] x = hotCoords["x"] y = hotCoords["y"] z = hotCoords["z"] if (x<xmin): xmin = x ymin = y zmin = z if (x>xmax): xmax = x yma...
<reponame>james-portman/openstack-ansible #!/usr/bin/env python # Copyright 2014, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
import re import sys import copy from text_match import TextMatch class HierarchicalConfiguration(object): """ A class for representing and comparing Cisco running configurations in a hierarchical tree data structure. An instance represents one line of a configuration. Each instance has text, indentation, and a l...
s def first(repo, subset, x): """``first(set, [n])`` An alias for limit(). """ return limit(repo, subset, x) def _follow(repo, subset, x, name, followfirst=False): l = getargs(x, 0, 1, _("%s takes no arguments or a filename") % name) c = repo['.'] if l: x = getstring(l[0], _("%s expected a filename") % name) ...
<filename>plugins/modules/oci_sch_service_connector.py #!/usr/bin/python # Copyright (c) 2017, 2020 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl...
# License: BSD 3-clause # Authors: <NAME>, # <NAME> import numpy as np from numpy.lib.stride_tricks import as_strided import scipy.signal as sg from scipy import linalg, fftpack from numpy.testing import assert_almost_equal def rolling_mean(X, window_size): """ Calculate the rolling mean Parameters ---------- ...
<reponame>epichide/ExonDataSimulation import collections import json import os import re import matplotlib.pyplot as plt from basic import * class Line(object): ''' when begin-end+1==1,it's 1 size region when begin-end+1==0,it's 0 size point , point is right of end when begin=='.' xor end=='.',change it to cas...
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Build indexing and search.""" import heapq import logging import random import re from google.appengine.ext import db from google.appengine.ext import n...
<reponame>Mehrad0711/oslo import time from math import sqrt import psutil import torch import torch.distributed as dist from anytree import Node from oslo.pytorch.model_parallelism.network.broadcaster import Broadcaster from oslo.pytorch.model_parallelism.utils.extensions import get_parameter_dtype from oslo.pytorch....
strArtOrd = '' if intArtOrd == 1: strArtOrd = 'Articles' elif intArtOrd == 2: strArtOrd = 'Orders' else: strArtOrd = 'Articles' form = SQLFORM.factory(Field('Select', 'text', \ default = strArtOrd, \ widget = SQLFORM.widgets.radio.widget, \ requires = [IS_IN_SET(['Articles', 'Orders'], zero = None...
# Standard python import json # Dependencies # This package from domvrt.parser_mapping import ParserMapping import domvrt.utils as utils class Results(object): """docstring for Results.""" map = None INSERT = "insert" REMOVE = "remove" UPDATE = "update" MATCH = "match" issueNumber = 1 # Issue = Actual chan...
<gh_stars>1-10 import math import logging from os import path from abc import ABCMeta from typing import List, Mapping, Optional, Dict from glob import glob import numpy as np import emloop as el import tensorflow as tf from .third_party.tensorflow.freeze_graph import freeze_graph from .third_party.tensorflow.average...
""" *** python package to validate JSON data against a schema. a **schema** is a python list containing dictionaries describing each parameter / key in the JSON object (both expected and optional) *** a **schema** can have a list of *expected* (must be in the JSON object) and *optional* keys (which may or m...
""" LSTM point process model. @author: manifold """ from typing import Tuple, List import torch from torch import Tensor from torch import nn from torch.nn.utils.rnn import PackedSequence from models.base import SeqGenerator, predict_from_hidden class HawkesLSTMCell(nn.Module): def __init__(self, input_dim: int, ...
@block_size.setter def block_size(self, block_size): assert isinstance(block_size, int) or block_size is None, \ f'block_size must be an integer or None; got {block_size}' self._blocksize = block_size @property def reps(self): return self._reps @reps.setter def reps(self, reps): assert isinstance(reps, int)...
PrincipalList(BaseModel): __root__: List[Principal] class CreateResourcePolicyStatementRequest(BaseModel): statementId: Name effect: Effect principal: PrincipalList action: OperationList condition: Optional[ConditionMap] = None class SlotTypeValues(BaseModel): __root__: Annotated[List[SlotTypeValue], Field(m...
<reponame>picopock/core """The tests for the Template cover platform.""" import pytest from homeassistant import setup from homeassistant.components.cover import ATTR_POSITION, ATTR_TILT_POSITION, DOMAIN from homeassistant.const import ( ATTR_DOMAIN, ATTR_ENTITY_ID, ATTR_SERVICE_DATA, EVENT_CALL_SERVICE, SERVICE_...
<filename>Master0.py # app.py import os, sys, time import json from threading import Thread from selenium import webdriver from selenium.webdriver.common.keys import Keys from webwhatsapi import WhatsAPIDriver from pprint import pprint from ServiceImporter import * # export PATH="$HOME/wholesomegarden/WhatsappRemin...
= info['coloring'] if coloring is None and info['static'] is not None: coloring = driver._get_static_coloring() if coloring and coloring_mod._use_total_sparsity: # if we're using simultaneous total derivatives then our effective size is less # than the full size if coloring._fwd and coloring._rev: pass # we're ...
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Softw...
<filename>c6d.py #!/usr/bin/env python # 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 writ...
import collections import fasteners import hightime import math import niscope import numpy import os import pytest import tempfile instruments = ['FakeDevice1', 'FakeDevice2'] # TODO(sbethur): Use `get_channel_names` when #1402 is fixed test_channels = 'FakeDevice2/0,FakeDevice1/1' # There are system tests below t...
== other.__dict__ def __ne__(self, other: 'CustomCertReqGeoRestrictions') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other class LabelEnum(str, Enum): """ properties. """ US = 'us' EU = 'eu' HIGHEST_SECURITY = 'highest_security' class Tls12SettingRe...
<reponame>Vincent-Vercruyssen/ML-stats """ Functions for the statistical comparison of multiple classifiers 1. Parametric: 2. Non-parametric: - Friedman 3. Post-hocs: - Nemenyi - Bonferroni-Dunn Terminology often used in literature is: - blocks = datasets - groups = treatment = the classifiers/methods Author: <NA...
import matplotlib.pyplot as plt import pandas as pd import sys import csv import math import neat from sklearn.metrics import accuracy_score from dateutil.parser import parse from datetime import datetime # from SPOT.spot import bidSPOT,dSPOT,SPOT from functools import reduce import numpy as np import random def col_b...
from math import exp, pi from numpy.linalg import eig from scipy.optimize import fmin_cg from scipy.spatial.transform import Rotation from sklearn.datasets import load_breast_cancer, load_digits, load_iris from sklearn.decomposition import PCA, KernelPCA from sklearn.preprocessing import StandardScaler from sklearn.nei...
the top-level classes in the namespace to be retrieved. Default: `None` DeepInheritance : `bool` Optional: Indicates that all (direct and indirect) subclasses of the specified class or of the top-level classes are to be included in the result. `False` indicates that only direct subclasses of the specified cla...
and Other,1970-01-01 23:32:00,1.67,84.0,1.24 7029,3,846.0,1172,Housework,1970-01-01 23:32:00,1.15,82.0,1.21 7030,4,378.0,1172,Child Care,1970-01-01 23:32:00,0.51,29.0,0.43 7031,5,84.0,1172,Adult Care,1970-01-01 23:32:00,0.11,15.0,0.22 7032,10,68489.0,1173,Leisure,1970-01-01 23:33:00,92.86,6307.0,93.33 7033,6,2772....
import functools import json import logging import os import re import sys import warnings from dataclasses import dataclass, field from typing import Dict, List, Optional, Union import numpy as np import torch import torchaudio import datasets from datasets import DatasetDict, load_dataset, load_metric, set_caching_e...
define the flow of information through the network def forward(self, x): # Compute the output feature map from the convolutional layers out = self.get_conv_output(x) pool_indices = out[self.POOL_INDICES] # Stretch out the feature map before feeding it to the FC layers flat = out[self.CONV_OUTPUT].view(-1,...
""" Defines the MapForwardSimulator calculator class """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Governm...
capsules of layer L) for all k: for all l: (over all patches) multiply input pose [(a,x)==(4,4)] with w [(x,d)==(4,4)] ''' next_capsule_value = torch.einsum('nklm, bnklhwax, klnxdm->bmhwad', query_key, _inputs, w) else: # Vectorised implementation next_capsule_value = torch.einsum('nklm, bnklh...
(new_tab[6:9], ) def escolher_posicao_manual(tab): """ Realiza a leitura de uma posicao introduzida manualmente por um jogador e devolve essa posicao escolhida. :param tab: Um tuple, tabuleiro. :return: Um int, posicao escolhida manualmente pelo jogador. """ if not eh_tabuleiro(tab): raise ValueError...
pd.Series.to_frame(high_act(Stock)) df_act = pd.DataFrame(date) df_act['Open'] = price_open df_act['Close'] = price_close df_act['Volume'] = v_act df_act['Low Price'] = low_price df_act['High Price'] = high_price estrategia_promedio = ft.seleccion_estrategia(Stock, 'promedios')[4] señales_1 = estrat...
<reponame>flatcar-linux/chromite #!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Program to run emerge in parallel, for significant speedup. Usage: ./parallel_emerge [--board=...
<reponame>ro0tmylove/myokok #!/usr/bin/env python3 # pylint: disable=invalid-name, too-many-branches, too-many-statements, broad-except, too-many-arguments, too-many-instance-attributes, line-too-long ''' this script replaces build.sh, coz bash/sed/awk is driving me insane ''' import atexit import glob import json i...
- pmean) / float(pstd) ##normalize local batch as well before computing metrics local_batch = local_batch.cpu().numpy() local_batch.reshape((2, img_dim,img_dim)) local_batch = (local_batch / 255) * 65535.0 local_batch = (local_batch - np.mean(local_batch)) / float(np.std(local_batch)) for t in threshs: TP, FP, ...
<filename>utils/reader.py from cProfile import label from collections import defaultdict from turtle import shape import torch from torch.utils.data import Dataset import random from transformers import AutoTokenizer, LukeTokenizer import copy import ahocorasick from intervaltree import IntervalTree, Interval from log ...
self.phi_color, }) def update_brace(brace): brace.stretch_to_fit_width( max(self.vector.get_width(), 0.001) ) brace.next_to(self.vector.get_center(), DOWN, SMALL_BUFF) return brace moving_brace = ContinualUpdate( Brace(Line(LEFT, RIGHT), DOWN), update_brace ) moving_x_without_phi = ContinualUpdate( x_witho...
import os import logging import json from operator import itemgetter import dtoolcore import dtoolcore.utils from ruamel.yaml import YAML # This is a hack. from dtool_info.inventory import _dataset_info from dtool_info.utils import sizeof_fmt from dtool_gui_tk.metadata import MetadataSchemaItem logger = logging.g...
"teasable", "teaseled", "teaseler", "teashops", "teatimes", "teawares", "teazeled", "teazling", "techiest", "tectites", "teddered", "teeniest", "teensier", "teenybop", "teetered", "teetotal", "teetotum", "tefillin", "tegmenta", "tegminal", "tegument", "tegumina", "teiglach", "tektites", "tektiti...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
<reponame>cjsteel/python3-venv-ansible-2.10.5<filename>lib/python3.8/site-packages/ansible_collections/community/network/plugins/modules/network/fortimanager/fmgr_secprof_av.py #!/usr/bin/python # -*- coding: utf-8 -*- # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify ...
<filename>senbonzakura.py #!/usr/bin/env python3 import os import fcntl import time import enum import curses #import pyaudio #import math senbonzakura = """ █████ ██████████ ███████████ ████████ ███ █████ ████ █████ ██ ████ ███████ █████ ███ ███ █ ██████████████████████████ ████ █ █████ ██████ ████████...
<reponame>michi7x7/python-deltasigma<filename>deltasigma/tests/test_realizeQNTF.py # -*- coding: utf-8 -*- # test_realizeNTF.py # This module provides the tests for the realizeNTF function. # Copyright 2014 <NAME> # This file is part of python-deltasigma. # # python-deltasigma is a 1:1 Python replacement of Richard Sch...
<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation th...
<reponame>Bhaskers-Blu-Org1/SIC from __future__ import print_function import torch from torch.utils.data import DataLoader from torchvision import transforms from torchvision.datasets.utils import download_url import os import errno import numpy as np import pandas as pd class CCLE_Dataset(torch.utils.data.Dataset): ...
MyClass.my_class_method(n, n + 1)) @dist_init def test_py_class_static_method(self): n = self.rank + 1 dst_rank = n % self.world_size ret = rpc.rpc_sync( worker_name(dst_rank), MyClass.my_static_method, args=(n + 10,) ) self.assertEqual(ret, MyClass.my_static_method(n + 10)) @dist_init def test_py_multi_asy...
<reponame>DodoHan/mycroft-core-zh<filename>msk/actions/create.py # Copyright (c) 2018 <NAME>, Inc. # # This file is part of Mycroft Skills Kit # (see https://github.com/MycroftAI/mycroft-skills-kit). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wit...
120: row_count = len(getRows('template1', qry)) if row_count == 1: break time.sleep(5) current_time = datetime.now() @when('wait until the process "{proc}" goes down') @then('wait until the process "{proc}" goes down') @given('wait until the process "{proc}" goes down') def impl(context, proc): start_time = cur...
is necessary. self.b_setAnimState("Happy", self.animMultiplier) self.wakeUp() # Play the emote duration = 0 self.emoteTrack, duration = Emote.globalEmote.doEmote(self, emoteIndex, ts) self.setActiveShadow(1) def doEmote(self, emoteIndex, animMultiplier=1, ts=0, callback=None, extraArgs=[]): # don't play emot...
<gh_stars>1-10 """Library to support dual-path speech separation. Authors * <NAME> 2020 * <NAME> 2020 * <NAME> 2020 * <NAME> 2020 * <NAME> 2020 """ import math import torch import torch.nn as nn import torch.nn.functional as F import copy from speechbrain.nnet.linear import Linear from speechbrain.lobes.models.t...
import os import time import sqlite3 import json import uuid as unique_id from sqlite3.dbapi2 import Connection from eth_utils.crypto import keccak from hexbytes import HexBytes from dataclasses import dataclass from pydantic import BaseModel from typing import Optional, Tuple, Sequence from devtools import debug fr...
= ['comment', 'creator', 'ddns_principal', 'name', 'reclaimable', 'target', 'view', 'zone'] _return_fields = ['extattrs', 'name', 'target', 'view'] _remap = {} _shadow_fields = ['_ref'] class DnskeyRecord(InfobloxObject): """ DnskeyRecord: DNS DNSKEY record object. Corresponds to WAPI object 'record:dnskey' T...
"""This module is part of the PeptideBuilder library, written by <NAME>, <NAME>, <NAME>, and <NAME>. The PeptideBuilder module contains code to generate 3D structures of peptides. It requires the Geometry module (also part of the PeptideBuilder library), which contains default bond lengths and angles for all amino aci...
will be novel. Defaults to false. The following example shows that after you train a model on the Nations dataset, you can score all entities w.r.t a given relation and tail entity. >>> from pykeen.pipeline import pipeline >>> result = pipeline( ... dataset='Nations', ... model='RotatE', ... ) >>> df = result...
values for i in vals: self._labels.append(str(i)) a = df.loc[(df[exposure] == i) & (df[outcome] == 1)].shape[0] self._a_list.append(a) b = df.loc[(df[exposure] == i) & (df[outcome] == 0)].shape[0] self._b_list.append(b) em, lcl, ucl, sd, *_ = odds_ratio(a=a, b=b, c=self._c, d=self._d, alpha=self.alpha) self.odd...
<reponame>megaden/drf-shortcuts<gh_stars>1-10 # -*- coding: utf-8 -*- """serializers module of DRF (Django REST Framework) shortcuts package. Functions: - #generate_detail_view_name: Generates detail view name for a viewset which DRF uses to expose it. - #generate_serializer_base_name: Generates base name to be used...
"""New style (fast) tag count annos Use these for new projects. """ from mbf_genomics.annotator import Annotator from typing import Dict, List from pypipegraph import Job from mbf_genomics import DelayedDataFrame import numpy as np import pypipegraph as ppg import hashlib import pandas as pd import mbf_r import rpy2....
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Check that explain_binary_size_delta seems to work.""" import cStringIO import sys import unittest import explain_binary_size_delt...
= (s >= 60) if np.any(h[mask] != 23) or np.any(m[mask] != 59): raise ValueError("invalid numeric value in ISO time") return sec_from_hms(h,m,s) ######################################## def day_sec_from_iso(strings, validate=True, strip=False): """Day and second based on a parsing of the string in ISO date-time f...
display_name is not None: details['displayName'] = display_name client = cli_util.build_client('blockstorage', ctx) result = client.copy_volume_backup( volume_backup_id=volume_backup_id, copy_volume_backup_details=details, **kwargs ) if wait_for_state: if hasattr(client, 'get_volume_backup') and callable(geta...
<filename>lt_torch.py<gh_stars>1-10 import torch import torchvision class MyReshape(torch.nn.Module): def __init__(self, *args): super(MyReshape, self).__init__() self.shape = args def forward(self, x): return x.view(*self.shape) def one_shot_iterator(dataloader): while True: for data in dataloader: yie...
<gh_stars>0 """Contains code related to the RecMA module.""" # standard import logging import time import datetime # local from modules.constants import RUN_SLEEP, BOTTOM, NOT_PARTICIPANT import modules.constants as constants from resolve.enums import MessageType # globals logger = logging.getLogger(__name__) clas...
<gh_stars>0 import pysam import os import re import sys from collections import Counter import pandas as pd from functools import reduce #python3 #pysam 0.15.0 def getindelpos(cigarstring): insertionpositions = [] deletionpositions = [] #Given a cigar string, return positions of insertions and deletions cigarstri...
["Select Animation Frame:", dcc.Dropdown( id='anim-frame-2D', multi=False, placeholder='Select an option ' 'for Animation Frame')], ), ], style={ 'padding': 10}), ], style={ 'display': 'inline-block', 'width': '32%', 'float': 'right', 'fontSize': 14, 'font-family': 'Raleway', 'backgroundColor': '#ffffff...
user, the user state must be DISABLED . Use the DescribeUser action to confirm the user state. Deleting a user is permanent and cannot be undone. WorkMail archives user mailboxes for 30 days before they are permanently removed. See also: AWS API Documentation Exceptions :example: response = client.delete_user( ...
import copy import sys from collections import OrderedDict from django.utils import timezone from django.db import models from django.db.models.fields import FieldDoesNotExist, related, Field from django import dispatch from django.utils import formats from django.core.exceptions import ValidationError try: from .....
<filename>chroma_core/models/filesystem.py # Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. from toolz.functoolz import pipe, partial, flip from django.db import models from django.db.models import CASCADE from chroma_...
<filename>main.py #!/usr/bin/env python3 import collections import json import os import pprint import sys # sys нужен для передачи argv в QApplication from pathlib import Path from time import sleep, time import pyperclip import xmltodict from PyQt5 import QtCore, QtGui, QtWidgets, uic # from PyQt5.QtCore import * #...
#!/usr/bin/env python #-*- coding: utf-8 -*- # # # #import wxversion #wxversion.select('2.8') #import sqlite3 import handy_utils as HUD import datetime import pout from db_related import TableAware, SQConnect, Tabling, DBConnect, TableSupport ################## Support Table #################################### pou...
<reponame>beliaev-maksim/pyaedt import os try: import pytest except ImportError: import _unittest_ironpython.conf_unittest as pytest # Setup paths for module imports from _unittest.conftest import scratch_path import gc # Import required modules from pyaedt import Hfss from pyaedt.generic.filesystem import Scratch ...
from __future__ import absolute_import, division, print_function from libtbx import test_utils import sys from iotbx.pdb.tst_secondary_structure import pdb_1ywf_sample_strings, \ get_annotation import iotbx.pdb from iotbx.pdb.utils import all_chain_ids from iotbx.pdb.secondary_structure import annotation from six.move...
dest_files: dpath = os.path.join(this_dest_folder, dfile) if not os.path.isfile(dpath): continue dext = os.path.splitext(dfile)[1] if dext == "zip": # have to unzip to check temppath = Utilities.unzip_to_temp(dpath, tempfolder=tempfolder) dest_sha256 = Utilities.sha_256(temppath, size=4096) else: dest_sha256...
!= 9999.0) & (abs(full_magnitude2) != 99.0) & (abs(full_magnitude2) != 9999.0) & (abs(full_magnitude2) != 99.0) & (abs(full_magnitude2) != 37.5) & (flag1 == 0) & (flag2 == 0) & (cm_flag1 == 0) & (cm_flag2 == 0) & (cm_s2n_r1 > 10) & (cm_s2n_r2 > 10) & (cm_t1/cm_t_err1 > 0.5) & (cm_t2/cm_t_err2 > 0.5) & (cm_t1/psfrec_t1 ...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI 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 ...
<filename>ren/preprocessing.py import os, sys, glob import tensorflow as tf import pandas as pd import numpy as np from read_roi import read_roi_file, read_roi_zip import skimage import skimage.io import skimage.draw import skimage.transform from tqdm import tqdm from typing import Dict, Tuple, List, Callable from jobl...
<reponame>sielenk-yara/PyCrop2ML # coding: utf8 from __future__ import absolute_import from pycropml.transpiler.errors import PseudoCythonTypeCheckError from pycropml.transpiler.helpers import serialize_type from Cython.Compiler import ExprNodes from six.moves import zip # based on pseudo V = '_' # we don't really ty...
<gh_stars>1-10 import network from replaybuffer import ReplayBuffer import logger import time import gym import numpy as np import argparse import os import json import datetime import logging import shutil import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from pathlib import Path import torch ...
with -cov.fif or -cov.fif.gz. cov : Covariance The noise covariance matrix. See Also -------- read_cov """ cov.save(fname) ############################################################################### # Prepare for inverse modeling def _unpack_epochs(epochs): """Aux Function.""" if len(epochs.event_id) >...
1): N, p, q, r, s = line(infile) A = [((i * p + q) % r + s) for i in xrange(N)] total = sum(A) totalsum = [a for a in A] for i in xrange(1, N): totalsum[i] += totalsum[i - 1] best = total b = 0 for a in xrange(N): if b < a: b += 1 while b < N - 1 and getsum(a, b, total, totalsum) >= getsum(a, b + 1, total...
<reponame>tkamata-test/ydk-py<gh_stars>0 import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENC...
subset of G utwi = copy.deepcopy(ut) utwi.alpha.append([0, ut, 1]) utwi.beta.append([0, ut, 1]) sossp.insttree(utwi) sogsp.insttree(utwi) finished = False # take a new element of the group. indofg = 1 while not finished: # get next element while True: nt = rand_generator(disc, classnum, qin) if nt not in ...
#!/usr/bin/python ############################################################################# #Package: stamp #Updated by <NAME> #Usage: #generate mtDNA alignments for whole-genome sequencing data # ############################################################################## from argparse import ArgumentP...
GriddedPerm(Perm((1, 2, 0)), ((4, 6), (4, 6), (4, 6))), GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 0), (2, 2))), GriddedPerm(Perm((0, 1, 2, 3)), ((2, 2), (2, 2), (2, 3), (2, 3))), GriddedPerm(Perm((0, 1)), ((6, 4), (6, 4))), GriddedPerm(Perm((1, 0)), ((6, 4), (6, 4))), GriddedPerm(Perm((0, 1)), ((7, 7), (7, 7))), ...
26.3083064324413*m.b1051) + 0.434294481903252*log(1 + 303.950065669888*m.b1052) + 0.434294481903252*log(1 + 20.9149881537067 *m.b1053) + 0.434294481903252*log(1 + 88.1958391547073*m.b1054) + 0.434294481903252*log(1 + 18.1326602334317*m.b1055) + 0.434294481903252*log(1 + 11.0420408100848*m.b1056) + 0.434294481903...
8121, 8122, 8124, 8125, 8129, 8130, 8131, 8132, 8134, 8135, 8136, 8138, 8140, 8141, 8142, 8143, 8144, 8145, 8146, 8150, 8151, 8152, 8153, 8154, 8157, 8158, 8159, 8160, 8161, 8162, 8164, 8165, 8166, 8167, 8168, 8170, 8172, 8173, 8178, 8179, 8180, 8182, 8183, 8184, 8186, 8188,...
import csv import errno import json import logging import os import shutil import stat import time import traceback from concurrent.futures import ThreadPoolExecutor, as_completed, wait from datetime import datetime, timedelta, timezone from random import randrange import humanize import requests from django.conf impo...
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('created', models.DateTimeField(default=None, editable=False)), ('modified', models.DateTimeField(default=None, editable=False)), ('description', models.TextField(default='', blank=True)), ('active', models.BooleanFi...
"MsiFileCorrupted": { "type": "integer", "title": "MSI File Corrupted", "description": "MSI file corrupted", "order": 13 }, "MsiSendFail": { "type": "integer", "title": "MSI Send Fail", "description": "MSI Send Fail", "order": 21 }, "NewerInstalled": { "type": "integer", "title": "Newer Installed", "desc...
if fileName: self.file = str(fileName) #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls") self.wbk = xlwt.Workbook(encoding="utf-8") self.sheet = self.wbk.add_sheet("sheet") #self.add2(sheet) self.heads_list = ["Energy(Mev)", "Ratio(1)", "Ratio(2)", "Atomic No(Z1)", "Atomic No(Z2)...
on the cluster, then applies operations (transformations & actions) to those datasets. # MAGIC Driver programs access Spark through a SparkContext object, which represents a connection to a computing cluster. A Spark SQL context object (`sqlContext`) is the main entry point for Spark DataFrame and SQL functionality. A ...