input
stringlengths
2.65k
237k
output
stringclasses
1 value
labels for each record in fasta file found in test_dir using the vowpal-wabbit model. Note that there must be a label file of the same basename with matching ids for each of the fasta lines. test_dir (string): must be a path to a directory with a single fasta and label file model_dir (string): must be a path to ...
<gh_stars>10-100 import asyncio import discord import os import time from discord.ext import commands from discord.ext.commands import BucketType from humanfriendly import format_timespan as timeez from data import dbconn from utils import challonge_api, paginator, discord_, tournament_helper from constants import BO...
# ----------------------------------------------------------------------------- # # Copyright 2013-2019 lispers.net - <NAME> <<EMAIL>> # # 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 # # h...
# Copyright (C) 2016 Nippon Telegraph and Telephone 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 applicab...
normal target encoding when given test data. Parameters ---------- X : pandas DataFrame of shape (n_samples, n_columns) Independent variable matrix with columns to encode Returns ------- pandas DataFrame Input DataFrame with transformed columns """ # Use target encoding from fit() if this is test data if ...
unknowns, parallel_verbosity) if report_level >= 1: print('\nSummaries for empirical parameter distributions\n-----------------------------------------------') print(pandas.DataFrame(repeated_estimates).describe().T) if report_level >= 2: _runtimes_min = [result[1]['runtime_min'] for result in results] pr...
""" This module contains methods used our implementation of the Asynchronously Parallel Optimization Solver for finding Multiple Minima (APOSMM) method described in detail in the paper `https://doi.org/10.1007/s12532-017-0131-4 <https://doi.org/10.1007/s12532-017-0131-4>`_ """ from __future__ import division from __fut...
grep " "openpyxl'. If that is the case, fix with 'pip install openpyxl==2.4.8'") raise e data = save_virtual_workbook(xl) r = Response(data, mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", status=200) return r @app.route(nis_api_base + "/isession/regenerate_xlsx", methods=["POS...
<filename>dev/Tools/build/waf-1.7.13/lmbrwaflib/packaging.py # # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed ...
to :return: Keycloak server response """ params_path = {"realm-name": self.realm_name, "id": user_id, "group-id": group_id} data_raw = self.raw_put( urls_patterns.URL_ADMIN_USER_GROUP.format(**params_path), data=None ) return raise_error_from_response(data_raw, KeycloakPutError, expected_codes=[204]) def grou...
numpy.arange(N + 1, dtype=float) + 0.5 index = index2[0:-1] K1 = special.kv(index2, kappa * r1) K1p = index / (kappa * r1) * K1[0:-1] - K1[1:] k1 = special.kv(index, kappa * r1) * numpy.sqrt(pi / (2 * kappa * r1)) k1p = -numpy.sqrt(pi / 2) * 1 / (2 * (kappa * r1)**(3 / 2.)) * special.kv( index, kappa * r1) + num...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Feb 28 16:11:52 2018 Functions for LARFP_lumen_segmentation_CGV.py @author: clauvasq """ # import packages import numpy as np import matplotlib.pyplot as plt import skimage.io as io io.use_plugin('tifffile') from skimage.filters import threshold_otsu fr...
""" @author sanjeethr, oligoglot Implements SGDClassifier using FeatureUnions for Sentiment Classification of text It also has code to experiment with hyper tuning parameters of the classifier """ from __future__ import print_function import numpy as np import pickle import json from pprint import pprint from time im...
<reponame>t-kimber/kinoml<filename>kinoml/modeling/OEModeling.py import logging from typing import List, Set, Union, Iterable from openeye import oechem, oegrid, oespruce, oequacpac, oeomega, oeshape import pandas as pd def read_smiles(smiles: str) -> oechem.OEGraphMol: """ Read molecule from a smiles str...
# pylint:disable=too-many-lines import copy import ipaddress import struct import sortedcontainers import thrift.protocol.TBinaryProtocol import thrift.transport.TTransport import common.ttypes import constants import encoding.ttypes import encoding.constants import key import utils RIFT_MAGIC = 0xA1F7 class Packe...
<filename>melina.py #!/usr/bin/env python import os import sys import shlex import argparse import enum import re import io import lxml.etree as ET import decimal __version__ = '0.1' ''' Mo name children fields (Struct, Enum, Scalar) Field name cardinality type Struct name fields (...) Enum name enumerator...
<reponame>brianrodri/google_appengine #!/usr/bin/env python # # Copyright 2007 Google 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-2.0 # # U...
If no label information is available, this will only be the style part of the code. """ length = len(data) code = np.ndarray((length, self.code_dim)) offset = 0 batches = self._np_batcher(data, batch_size=batch_size) code_batches = \ self._tf_encode_batches(batches, tf_encoded=self._tf_encoded_style) for batc...
# -*- coding: utf-8 -*- """ This file contains MLTools class and all developed methods. """ # Python2 support from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function import numpy as np import pickle class MLTools(object)...
("bn", "Bengali"), ("br", "Breton"), ("bs", "Bosnian"), ("ca", "Catalan"), ("cs", "Czech"), ("cy", "Welsh"), ("da", "Danish"), ("de", "German"), ("dsb", "Lower Sorbian"), ("el", "Greek"), ("en", "English"), ("en-au", "Australian English"), ("en-gb", "British English"), ("eo", "Esperanto"), ("es", "Spanish...
<reponame>Roboy/LSM_SpiNNaker_MyoArm from pacman import exceptions from pacman.model.resources.resource_container import ResourceContainer from pacman.model.resources.dtcm_resource import DTCMResource from pacman.model.resources.sdram_resource import SDRAMResource from pacman.utilities import utility_calls from pacman....
limit(optional): maximum number of entries to return # component(optional): only report promotions for this component commit_hash = request.args.get('commit_hash', None) distro_hash = request.args.get('distro_hash', None) extended_hash = request.args.get('extended_hash', None) agg_hash = request.args.get('aggregat...
<gh_stars>1-10 #! /usr/bin/env python # -*- coding: iso-8859-1 -*- from downloadCommon import DownloadCommon, getSeqName from DdlCommonInterface import DdlCommonInterface import re class OracleDownloader(DownloadCommon): def __init__(self): self.strDbms = 'oracle' def connect(self, info): try: import cx_Oracle...
APK's label according to a labeling scheme targetLabel = -1 targetKey = targetAPK[targetAPK.rfind("/")+1:].replace("_data", "") if os.path.exists("%s/%s.report" % (VT_REPORTS_DIR, targetKey)): report = eval(open("%s/%s.report" % (VT_REPORTS_DIR, targetKey)).read()) prettyPrint("VirusTotal report \"%s.report\" foun...
"""Provides algorithms with access to most of garage's features.""" import copy import os import time import cloudpickle from dowel import logger, tabular # This is avoiding a circular import from garage.experiment.deterministic import get_seed, set_seed from garage.experiment.experiment import dump_json from garage....
<reponame>def670/lfd import math import numpy import random import operator import types import numpy as np import h5py import IPython as ipy import os import time import argparse from lfd.mmqe import colorize def redprint(msg): print colorize.colorize(msg, "red", bold=True) def yellowprint(msg): print colorize.c...
= ( TautomerScore('benzoquinone', '[#6]1([#6]=[#6][#6]([#6]=[#6]1)=,:[N,S,O])=,:[N,S,O]', 25), TautomerScore('oxim', '[#6]=[N][OH]', 4), TautomerScore('C=O', '[#6]=,:[#8]', 2), TautomerScore('N=O', '[#7]=,:[#8]', 2), TautomerScore('P=O', '[#15]=,:[#8]', 2), TautomerScore('C=hetero', '[#6]=[!#1;!#6]', 1), Tautome...
from sdf_timing import sdfparse, sdfwrite from sdf_timing import utils as sdfutils from pathlib import Path import argparse import re import json from datetime import date from collections import defaultdict from .liberty_to_json import LibertyToJSONParser from . import log_printer from .log_printer import log class ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # import re import random import requests import inflect from twitterbot import TwitterBot inflector = inflect.engine() class DeepAnswerBot(TwitterBot): unrecognised_tweet = "@gelatindesign I could not understand this question :(" no_concepts_tweet = "@gelatindesign I...
- TODO: What format? @hide_tree hides the tree @exclude_those_with_too_many_nans_in_y_clustering removes elements with more than 25% nans from deciding the order in the y-clustering It's using ggplot and ggdendro... in the end, this code breads insanity""" column_number = len(set(data.get_column_view('condition'))...
to SLC35E2B ... if ( curID == "728661" ): print " --> changing gene from <%s> to SLC35E2B " % curGene curGene = "SLC35E2B" elif (nameChangeFlag == "YES"): if (newGene != curGene): # do NOT change to this "new" name if this name seems to # already be in use ... if ((newGene in curGeneSymbols) or (newGene in use...
i*block_size),(top_left_x+play_width + add, top_left_y+ i * block_size)) for j in range(len(grid_2[i])): pygame.draw.line(surface, (128, 128, 128), (top_left_x + add + j*block_size, top_left_y),(top_left_x + add + j*block_size, top_left_y + play_height)) def clear_rows(grid, locked_pos): # delete rows part ...
<reponame>mkulariya1/tefla from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import six import math import tensorflow as tf from collections import namedtuple from .layers import batch_norm_tf as batch_norm NamedOutputs = namedtuple('NamedOutputs'...
<reponame>schelleg/rfsoc_sam<gh_stars>10-100 __author__ = "<NAME>" __organisation__ = "The Univeristy of Strathclyde" __support__ = "https://github.com/strath-sdr/rfsoc_sam" import ipywidgets as ipw import numpy as np import plotly.graph_objs as go import warnings import matplotlib.pyplot as plt from PIL import Image ...
<filename>cf_perfeval/library.py from cf_perfeval.helpers import flatten # Prepare curve data def perfeval_prepare_curve_data(input_dict): # , subtype # import math nPoints = 4 performance = flatten(input_dict['predictions']) # chartdata subtype = input_dict['subtype'] kenmax = 0.5 ratemax = 0.5 for curve in pe...
<gh_stars>0 ''' konsentrasi.py Diberikan daftar mata kuliah yang diambil oleh seorang mahasiswa, tentukan apa konsentrasinya. Khusus untuk mahasiswa Program Studi TIF (064*). <NAME> (<EMAIL>) 20141227 * 20141227 * Mulai dengan mengumpulkan daftar mata kuliah untuk setiap * konsentrasi: RPL, KI, dan GK...
<reponame>dklopfenstein/biocode """Selected UniProt data saved in Python.""" # Copyright (C) 2014-2019 <NAME>. All rights reserved # # ADAPTED TO PYTHON from the UniProt file: # ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete DOWNLOADED = "2019_03_07" # UniProt source files were down...
a = tf.ones((xshape[1], 1), tf.float32) b = tf.zeros((xshape[1], 1), tf.float32) if (y == 2): c = tf.reshape(tf.stack([a, b], axis=1), [1, newshape]) elif (y == 4): c = tf.reshape(tf.stack([b, a, b, b], axis=1), [1, newshape]) d = tf.transpose(c, [1, 0]) # Create a [newshape, newshape] matrix by taking the matr...
raise aXeSIMError(msg) # test conversion to float try: tmp = float(depen_data[index]) except ValueError: msg = ("\nValue: {0:s} is not convertible to float!" .format(str(depen_data[index]))) raise aXeSIMError(msg) # check for ascending order if index > 0: # check that independent data is rising if indep_da...
expires after 24 hours. :type logGroupName: string :param logGroupName: **[REQUIRED]** The name of the log group to search. :type logStreamNames: list :param logStreamNames: Filters the results to only logs from the log streams in this list. If you specify a value for both ``logStreamNamePrefix`` and ``logStream...
p_group: p.p_def.write_new_test_instance( w, f'{p.name}:', instances=2 if p.repeatable else 1, end=',') def write_round_trip_test(self, w: GoWriter): self.write_new_test_instance(w, f'{self.short} :=') w.write(f'b, err := {self.short}.MarshalBinary()') with w.condition('err != nil'): w.write('t.Fatalf("%+v", e...
# Constructs the test @wraps(test_fn) def instantiated_test(self, name=name, test=test_fn, dtype=dtype, op=op): device_arg: str = cls.get_primary_device() if hasattr(test_fn, 'num_required_devices'): device_arg = cls.get_all_devices() # Sets precision and runs test # Note: precision is reset after the test is r...
only. PEM-encoded certificate of the CA that signed the source database server's certificate. """ return pulumi.get(self, "ca_certificate") @property @pulumi.getter(name="caCertificateSet") def ca_certificate_set(self) -> bool: """ Indicates whether the ca_certificate field is set. """ return pulumi.get(self,...
<filename>src/pydap/handlers/dap.py """A handler for remote datasets. DAP handlers convert from different data formats (NetCDF, eg) to the internal pydap model. The pydap client is just a handler that converts from a remote dataset to the internal model. """ import io import gzip import sys import pprint import copy...
np.argsort(cat['MAG_AUTO'][use]) if verbose: print('# {0:6s} {1:12s} {2:12s} {3:7s} {4} {5}'.format('id', 'ra', 'dec', 'mag', 'nDQ', 'nSat')) for line in cat[use][so]: rd = line['X_WORLD'], line['Y_WORLD'] nset = [] nsat = [] for i in range(N): xi, yi = wcs[i].all_world2pix([rd[0],], [rd[1],], 0) r = n...
import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import statsmodels.api as sm import datetime as dt from statsmodels.stats.multitest import fdrcorrection from pylab import savefig # FUNCTIONS YOU CAN USE: # analyses(filepath) spits out a nifty heatmap to let you check corr...
<reponame>antmicro/pyvidctrl import curses import string from fcntl import ioctl from v4l2 import * from .widgets import * KEY_ESCAPE = "\x1b" class CtrlWidget(Row): """ Base control widget class Each CtrlWidget is a label with a name of its control and another label with text 'Not implemented!'. Child CtrlWi...
<filename>stentseg/stentdirect/tests/test_stentgraph.py<gh_stars>1-10 from __future__ import print_function, division, absolute_import import numpy as np import networkx as nx from visvis import ssdf from stentseg.utils.new_pointset import PointSet from stentseg.stentdirect.stentgraph import (StentGraph, check_path_i...
<filename>Lib/site-packages/filebrowser/views.py # coding: utf-8 # general imports import os, re from time import gmtime, strftime # django imports from django.shortcuts import render_to_response, HttpResponse from django.template import RequestContext as Context from django.http import HttpResponseRedirect from djan...
= contcar_dict['len_vec_b'] len_c_contcar = contcar_dict['len_vec_c'] angle_alpha_degree_poscar = poscar_dict['angle_alpha_degree'] angle_beta_degree_poscar = poscar_dict['angle_beta_degree'] angle_gamma_degree_poscar = poscar_dict['angle_gamma_degree'] angle_alpha_degree_contcar = contcar_dict['angle_alpha_degre...
import datetime from sklearn.metrics import mean_squared_error, mean_absolute_error, f1_score import numpy as np import pandas as pd import matplotlib.pyplot as plt from .dataset import DataSet from .metergroup import MeterGroup from .disaggregate import ( CombinatorialOptimisation, Mean, FHMM, Zero, DAE, Seq2Poi...
<filename>tools/RNN/rnn_compiler/lstm_compiler/parser.py<gh_stars>1-10 # # Copyright 2019 Xilinx 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/LICE...
VelocityBodyYawspeed object return \ (self.forward_m_s == to_compare.forward_m_s) and \ (self.right_m_s == to_compare.right_m_s) and \ (self.down_m_s == to_compare.down_m_s) and \ (self.yawspeed_deg_s == to_compare.yawspeed_deg_s) except AttributeError: return False def __str__(self): """ VelocityBodyYawspee...
BotInfo entity exists and has Machine Provider-related fields. Args: machine_lease: MachineLease instance. """ if machine_lease.bot_id == machine_lease.hostname: return bot_info = bot_management.get_info_key(machine_lease.hostname).get() if not ( bot_info and bot_info.lease_id and bot_info.lease_expiration_t...
'physical-router']: return True kvps = self.bindings.get('key_value_pair') or [] kvp_dict = dict((kvp['key'], kvp['value']) for kvp in kvps) vnic_type = kvp_dict.get('vnic_type') or '' if vnic_type == 'baremetal': return True return False # end def is_last_vpg_vmi(self): if self.virtual_port_group: vpg_obj ...
Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.299797, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime ...
"""Tests for the REST API.""" import asyncio import json import re import sys import uuid from datetime import datetime from datetime import timedelta from unittest import mock from urllib.parse import quote from urllib.parse import urlparse from pytest import fixture from pytest import mark from tornado.httputil impo...
<reponame>pyspace/pyspace """ Select only a part of the instances .. todo: group instance selectors """ import random import logging from collections import defaultdict from pySPACE.missions.nodes.base_node import BaseNode from pySPACE.tools.memoize_generator import MemoizeGenerator class InstanceSelectionNode(Bas...
+ m.x1094 + m.x1124 + m.x1164 + m.x1176 + m.x1186 + m.x1200 + m.x1226 + m.x1234 <= 244) m.c33 = Constraint(expr= m.x89 + m.x97 + m.x113 + m.x120 + m.x129 + m.x141 + m.x160 + m.x176 + m.x183 + m.x191 + m.x201 + m.x208 + m.x215 + m.x223 + m.x230 + m.x242 + m.x252 + m.x259 + m.x283 + m.x290 + m.x302 + m.x310 + m.x320 ...
<gh_stars>10-100 import unittest from distutils.version import LooseVersion import owslib import pyramid.testing import pytest from tests import resources from tests.utils import ( get_test_weaver_app, mocked_remote_server_requests_wps1, setup_config_with_mongodb, setup_mongodb_jobstore, setup_mongodb_processsto...
var_list[7].name = 'temperature_centidegree' var_list[8].name = 'pressure_mbar' var_list[0].data = np.array([]) var_list[1].data = np.array([]) var_list[2].data = np.array([]) var_list[3].data = np.array([]) var_list[4].data = np.array([]) var_list[5].data = np.array([]) var_list[6].data = np.array([]) ...
<reponame>riverlane/deltalanguage<filename>deltalanguage/wiring/_decorators.py """User facing decorators for building DeltaGraph nodes.""" from __future__ import annotations from functools import wraps import logging from typing import (TYPE_CHECKING, Callable, List, Optional, Tuple, Type) from ._delta_graph imp...
with this value cannot be used with Inbound Replication into an MySQL Database Service instance with High Availability. Mutually exclusive with the ignore_missing_pks value. force_innodb - The MySQL Database Service requires use of the InnoDB storage engine. This option will modify the ENGINE= clause of CREATE T...
# generated by update to not change manually import dataclasses as dt import typing as t from enum import Enum, Flag from bungieapi.json import to_json @dt.dataclass(frozen=True) class GroupUserInfoCard: last_seen_display_name: str = dt.field( metadata={ "description": "This will be the display name the clan serv...
# roc should be: batch x multi_v x X x Y roc = weighted_multi_smooth_v[:, :, n, ...] yc = torch.sum(roc * t_weights, dim=1) elif kernel_weighting_type == 'w_K': # roc should be: batch x multi_v x X x Y roc = torch.transpose(multi_smooth_v[:, :, n, ...], 0, 1) yc = torch.sum(roc * t_weights, dim=1) else: raise V...
att_rp4_status, create_rp2_resp, att_rp2_status, create_rp4_resp, att_rp4_status, deploy_rp1_rp3_resp, deploy_rp4_rp7_resp, att_rp2_status, att_rp4_status, ] if ('test_dcnm_srp_merged_update_existing_unauth_err' == self._testMethodName): have_rp2_resp = self.payloads_data.get('have_rp2_resp') have_rp4_resp = ...
= self.CreateBucket() obj_uri = self.CreateObject(bucket_uri=bucket_uri, contents=b'foo') # Use @Retry as hedge against bucket listing eventual consistency. @Retry(AssertionError, tries=3, timeout_secs=1) def _Check1(): stdout = self.RunGsUtil( ['-o', option, 'ls', suri(bucket_uri)], return_stdout=True) self.ass...
<filename>modin/pandas/test/test_dataframe.py from __future__ import absolute_import from __future__ import division from __future__ import print_function import pytest import io import numpy as np import pandas import pandas.util.testing as tm from pandas.tests.frame.common import TestData import matplotlib import mo...
pady=7, sticky='we') row += 1 f = Tkinter.Frame(parent) f.grid(column=0, row=row, sticky='ew') row += 1 l = Tkinter.Label(f, text='To cite Segger or learn more about it press the Help button', fg="blue") l.grid(column=0, row=0, sticky='w') dummyFrame = Tkinter.Frame(parent, relief='groove', borderwidth=1) ...
list(padding[1]), list(padding[2])]) else: x = _padding(x, padding[0], 2) x = _padding(x, padding[1], 3) x = _padding(x, padding[2], 4) else: if num_dynamic_axis > 0: assert len(base_shape) == 4 if hasattr(C, 'pad'): x = C.pad(x, pattern=[list(padding[0]), list(padding[1]), list(padding[2]), [0, 0]]) else: x...
i) for i in known_items]) unknown_is_not_known = claripy.And(*[self._unknown_item.key != i.key for i in known_items]) unknown_items_result = Implies(self.is_not_overfull(state), Implies(unknown_is_not_known, pred(state, self._unknown_item))) # TODO try with just (since we don't really need the weird length=1 case) ...
running from ``0`` to ``self.n_Vrepresentation()-1``. If present, the V-representation object at the given index will be returned. Without an argument, returns the list of all V-representation objects. EXAMPLES:: sage: p = polytopes.simplex(4, project=True) sage: p.Vrepresentation(0) A vertex at (0.7071067812...
= [] from mist.api.machines.models import Machine all_machines = Machine.objects(cloud=self.cloud, missing_since=None) for machine in all_machines: if machine.extra.get('tags', {}).get('type') == 'hypervisor': machines.append(machine) return machines def _list_machines__update_generic_machine_state(self, machi...
<gh_stars>1-10 # modified may 2011 to name components (map/ped) as RgeneticsData to align with default base_name # otherwise downstream tools fail # modified march 2011 to remove post execution hook # pedigree data faker # specifically designed for scalability testing of # Shaun Purcel's PLINK package # derived ...
import numpy as np import tensorflow as tf class Model: """Model class Used for storing methods that generalize to all models. """ def __init__( self, initial_conditions=None, model_parameters=None, final_time=None, time_steps=None): self.initial_conditions = initial_conditions self.model_parameters = mo...
object """ if device.uuid is None: return _FS_UNAVAIL else: return device.uuid def _GetInstNic(index, cb): """Build function for calling another function with an instance NIC. @type index: int @param index: NIC index @type cb: callable @param cb: Callback """ def fn(ctx, inst): """Call helper function...
used by other tools. print(','.join( toolchain.FilterToolchains(toolchains, 'default', True).keys() + toolchain.FilterToolchains(toolchains, 'default', False).keys())) def GeneratePathWrapper(root, wrappath, path): """Generate a shell script to execute another shell script Since we can't symlink a wrapped ELF (...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and / or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distribute...
<gh_stars>10-100 # -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.bas...
import smart_imports smart_imports.all() TIME_TO_LVL_DELTA = float(7) # разница во времени получения двух соседних уровней TIME_TO_LVL_MULTIPLIER = float(1.02) # множитель опыта, возводится в степень уровня INITIAL_HP = int(500) # начальное здоровье героя HP_PER_LVL = int(50) # бонус к здоровью на уровень MOB_HP...
"decreased", "bose", "roc", "blockbuster", "smog", "wildfire", "man.", "e.t.", "amethyst", "collided", "walk-in", "prussia", "invoices", "mir", "infidel", "rogelio", "wart", "forceful", "lieu", "iodine", "decreed", "hairline", "'hello", "theatres", "wreak", "karina", "limelight", "duffel", "...
MONOSPACE CAPITAL F 1D676 MATHEMATICAL MONOSPACE CAPITAL G 1D677 MATHEMATICAL MONOSPACE CAPITAL H 1D678 MATHEMATICAL MONOSPACE CAPITAL I 1D679 MATHEMATICAL MONOSPACE CAPITAL J 1D67A MATHEMATICAL MONOSPACE CAPITAL K 1D67B MATHEMATICAL MONOSPACE CAPITAL L 1D67C MATHEMATICAL MONOSPACE CAPITAL M 1D67D MATHEMATICAL MONOSPAC...
from twitchio.ext import commands import twitchio as tw import config as cf import inflect import random as rd import re from alphagram import alphagram from api import predict from calculator import equity, evaluate from cipher import cipher import dictionary from difflib import SequenceMatcher from ety import origins...
sheet.write(idx + 1, 4, nexttower['tower_name']) sheet.write(idx + 1, 5, toweridx) #if idx==0: #sheet.write(idx + 1 , 0, str(uuid.UUID('0'*32))) #sheet.write(idx + 1 , 1, u'变电站') #sheet.write(idx + 1 , 2, 0) #sheet.write(idx + 1 , 3, tower['id']) #sheet.write(idx + 1 , 4, tower['tower_name']) #sheet.writ...
#!/usr/bin/env python """ Test cases for tournament.py These tests are not exhaustive, but they should cover the majority of the cases. """ import unittest from tournament import * class TestTournament(unittest.TestCase): def setUp(self): delete_matches() delete_players() def tearDown(self): delete_matches(...
from django.core.exceptions import PermissionDenied from django.views.decorators.http import require_GET from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string from django.urls import reverse from django.conf import settings from programmes.models import ( Programme, ...
version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` id :param sort: The data field(s) to use for sorting the output. Default is id. Valid values are id, schedule_name, time_zone, system_window_ind, recur_type, start_date, end_date, interval, ordinal, period_mins, start_min, end_min...
<filename>python/three_sums.py<gh_stars>10-100 from unittest import TestCase def threeSum_old(nums): result = [] for i in range(len(nums)): for j in range(i + 1, len(nums)): for k in range(j + 1, len(nums)): if nums[i] + nums[j] + nums[k] == 0: new_list = sorted([nums[i], nums[j], nums[k]]) if new_list not in ...
0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.44797, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': ...
#No description available self.setFocus(self.list4) elif self.descr_view==False: self.setFocus(self.list) elif action==ACTION_MOVE_LEFT: if self.descr_view==True: self.list3tb.setVisible(0) self.list.setVisible(1) self.setFocus(self.list) self.descr_view=False elif (self.getFocus()==self.list) and (...
import numpy as np from .pyramid import Pyramid from .filters import parse_filter from .c.wrapper import corrDn, upConv class WaveletPyramid(Pyramid): """Multiscale wavelet pyramid Parameters ---------- image : `array_like` 1d or 2d image upon which to construct to the pyramid. height : 'auto' or `int`. The h...
# Copyright 2021 AIPlan4EU project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
size:", str(batchY.size())) if debug: print("batchX[0]:", str(batchX[0])) if debug: print("batchY size:", str(batchY.size())) labels = batchY.view(batch_size, -1, output_dim) max_length = labels.size(1) if debug: print("max_length:", str(max_length)) #if debug: print("batchX:", str(batchX.size()), "batchY:", str...
of `multiply_diag` is the same as ``self.dot(diag_vect.diag(), (axis, 0))`` if `direction` is "right" or "r" (the diagonal matrix comes from the right) or ``self.dot(diag_vect.diag(), (axis, 1))`` if `direction` is "left" or "l". This operation is just done without constructing the full diagonal matrix. """ ass...
<reponame>Sunnyfred/Atlantic_Hurricane_Simulations<gh_stars>0 import csv import matplotlib.pyplot as plt import numpy as np from collections import OrderedDict import matplotlib as mpl # import matplotlib.gridspec as gridspec from matplotlib.ticker import MaxNLocator from matplotlib.ticker import StrMethodFormatter imp...
# Created on 2017-8-31 # Usage: Lower Limit of Energy Requirements (LLER) for area of interest. #-------------------------------------------------------------------------------------------------------------- #Import all necessary module dependencies import arcpy from arcpy.sa import * import numpy import os import str...
<reponame>veot/ifcb-features # The following includes a modified version of the phasecong function from # phasepack. # It skips several steps that are not used in IFCB segmentation # Original license reproduced below # MIT License: # Permission is hereby granted, free of charge, to any person obtaining a # copy of ...
picking is enabled and all remaining command fields are ignored (valid only in the GUI). A component name may also be substituted for NP1 (NP2 and NINC are ignored). dx, dy, dz Keypoint location increments in the active coordinate system (DR, Dθ, DZ for cylindrical, DR, Dθ, DΦ for spherical). kinc Keypoint inc...
start positions, run lengths, run values """ where = np.flatnonzero if not isinstance(array, h5py.Dataset): array = np.asarray(array) n = len(array) if n == 0: return (np.array([], dtype=int), np.array([], dtype=int), np.array([], dtype=array.dtype)) if chunksize is None: chunksize = n starts, values = [...
<filename>src/train_utils.py import os import random import tempfile import matplotlib.image as mpimg import matplotlib.pyplot as plt import numpy import numpy as np import tensorflow as tf from sklearn.metrics import roc_curve, auc from tensorflow import keras from tensorflow.keras import backend as K from tensorflow...