input
stringlengths
2.65k
237k
output
stringclasses
1 value
# # Copyright (c) SAS Institute 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 # # Unless required by applicable law or agreed to in writi...
- name: query_body # in: body # description: 日志查询条件 # required: true # type: json # responses: # '200': # description: 返回点击列表 # schema: # $ref: '#/definitions/clickItems' # default: # description: Error # schema: # $ref: '#/definitions/Error' # """ # query_body = json.loads(self.request.body) # from_time = query_body.g...
""" def __init__(self): r""" :param IssueTypes: 异常详情。 :type IssueTypes: list of IssueTypeInfo :param EventsTotalCount: 异常事件总数。 :type EventsTotalCount: int :param HealthScore: 健康得分。 :type HealthScore: int :param HealthLevel: 健康等级, 如:"HEALTH", "SUB_HEALTH", "RISK", "HIGH_RISK"。 :type HealthLevel: str """ sel...
> len(self.X_train): self.y_train = self.y_train.iloc[len(self.y_train)-len(self.X_train):] # If this is a Keras estimator, we require the preprocessing to return a data frame instead of a numpy array prep_return = 'df' if self.model.using_keras else 'np' # Construct the preprocessor prep = Preprocessor(self.mod...
start ( ) if 64 - 64: Ii1I / i1IIi % I1IiiI - o0oOOo0O0Ooo if 11 - 11: I1ii11iIi11i - OoooooooOO if 16 - 16: IiII % OoooooooOO - ooOoO0o * Ii1I - Ii1I if 27 - 27: IiII + iIii1I11I1II1 / Oo0Ooo + OoO0O00 % Oo0Ooo + OoO0O00 if 77 - 77: Oo0Ooo * ooOoO0o % Ii1I if 2 - 2: I11i / Oo0Ooo / Ii1I / I1ii11iIi11i / Oooooooo...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Translate messages from files and from agents to the matching engine @author: ucaiado Created on 10/24/2016 """ import pprint import numpy as np def translate_trades_to_agent(row, my_book): ''' Translate the instruction passed by an agent into trades messages to the ...
<reponame>JuliaMota/ross<filename>ross/stochastic/st_results.py<gh_stars>0 """STOCHASTIC ROSS plotting module. This module returns graphs for each type of analyses in st_rotor_assembly.py. """ import numpy as np from plotly import express as px from plotly import graph_objects as go from plotly import io as pio from p...
def __init__(self, units, thetas_dim, device, backcast_length=10, forecast_length=5, nb_harmonics=None): if nb_harmonics: super(SeasonalityBlock, self).__init__(units, nb_harmonics, device, backcast_length, forecast_length, share_thetas=True) else: super(SeasonalityBlock, self).__init__(units, forecast_length, dev...
#!/usr/bin/env python # -*- coding: utf-8 -*- #--------------------------------------------------------------------------------- # # ,--. # | |-. ,---. ,---. ,--.--.,--,--, # | .-. '| .-. :| .-. || .--'| \ # | `-' |\ --.' '-' '| | | || | # `---' `----' `---' `--' `--''--' # # file: nested_tree_test # desc: This test wi...
<reponame>SpillChek2/tfrs """ REST API Documentation for the NRS TFRS Credit Trading Application The Transportation Fuels Reporting System is being designed to streamline compliance reporting for transportation fuel suppliers in accordance with the Renewable & Low Carbon Fuel Requirements Regulation. OpenAPI spec ...
#!/usr/bin/env python3 """ See freq_response.md for details """ from dataclasses import dataclass import fractions import math from typing import Iterable, Optional, Tuple, Union import numpy as np from analysis import linearity, time_domain_response from utils import utils from unit_test import unit_test from pro...
src, 'target': targ} for src, targ, attrs in netx_edges] edge_df = pd.DataFrame.from_records(netx_edge_list) # TODO: This will blow if there are no edges or no nodes ... so will create_network_from_igraph() ... will R blow, too? # Make sure critical attributes are strings node_df['name'] = node_df['name'].astype(...
# -*- coding: utf-8 -*- # cython: language_level=3 # BSD 3-Clause License # # Copyright (c) 2020-2022, Faster Speeding # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of sour...
- m.x1051 == 0) m.c718 = Constraint(expr= m.x520 - m.x1052 - m.x1053 - m.x1054 - m.x1055 - m.x1056 - m.x1057 - m.x1058 == 0) m.c719 = Constraint(expr= m.x521 - m.x1059 - m.x1060 - m.x1061 - m.x1062 - m.x1063 - m.x1064 - m.x1065 == 0) m.c720 = Constraint(expr= m.x522 - m.x1066 - m.x1067 - m.x1068 - m.x1069 - m.x1070 ...
""" Copyright 2021 Novartis Institutes for BioMedical Research 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 Unless required by applicabl...
if self.isValidValue(v): vl.append(self.citems[v]) continue # end of while(v) if self.sweepRange[1] - v > 0: if self.isValidValue(v): vl.append(self.citems[v]) else: return vl else: for v in self.valList: if self.isValidValue(v): vl.append(self.citems[v]) return vl return vl def calcCaseNum(self): """ ...
# Copyright 2009 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 # # Unless required by applicable law or agreed to in writing, soft...
import re import logging from datetime import datetime from sqlalchemy import func, or_, DATE from dataactcore.models.domainModels import Zips, CityCode, ZipCity, DUNS from dataactcore.models.stagingModels import PublishedAwardFinancialAssistance from dataactcore.models.lookups import (ACTION_TYPE_DICT, ASSISTANCE_TY...
<filename>pyNA/src/aircraft.py import pdb import json import numpy as np import pandas as pd from dataclasses import dataclass from pyNA.src.settings import Settings from scipy import interpolate @dataclass class Aircraft: """ Aircraft class containing vehicle constants and aerodynamics data. """ # Vehicle param...
Nyinchung Monastery', 'Chharka Bon Monastery', 'Dolpo Zhur monastery', 'Myanmar Monastery', 'Dolpo Menmo monastery', 'SHIMEN MONASTERY', 'Drakngon Pema Choeling Monastery', 'Dolpo Jampa monastery', 'Dolpo Jaglung Ladang monastery', 'Choejung Palri Monastery', 'New Hungtram monastery', 'Namgung Monastery', 'Pema Dechan ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' @Autor: <NAME> @Tema: Pronosticador del Futbol Ecuatoriano @Descripcion: Genere el archivo de respuesta html, la información contenida en una instancia de la clase info_liga ''' import recoleccion_info import graficos_liga import os import sys # CLASE VOLCADO INFO cl...
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progra...
key in enumerate(pos_labels[:-2]): pos_sliders[key] = widgets.IntSlider(value=0, min=0, max=pos_dims[ikey] - 1, step=1, description='{} Step:'.format(key), continuous_update=False) def update_sho_plots(sho_quantity, step_ind): bias_slider.set_xdata((step_ind, step_ind)) spatial_dict[step_chan] = [step_ind] spat...
<reponame>alexbowers/pulumi-aws # coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence...
<filename>time_series/time_series.py #!/usr/bin/env python # coding: utf-8 # # Project description # # Sweet Lift Taxi company has collected historical data on taxi orders at airports. To attract more drivers during peak hours, we need to predict the amount of taxi orders for the next hour. Build a model for such a p...
check was introduced. """ previous_last_logged_in_datetime = ( user_services.get_user_settings(self.viewer_id).last_logged_in) self.assertIsNotNone(previous_last_logged_in_datetime) current_datetime = datetime.datetime.utcnow() mocked_datetime_utcnow = current_datetime - datetime.timedelta(days=1) with self.moc...
= _bacnet.UNITS_DEGREES_KELVIN_PER_MINUTE _bacnet.UNITS_DEGREES_FAHRENHEIT_swigconstant(_bacnet) UNITS_DEGREES_FAHRENHEIT = _bacnet.UNITS_DEGREES_FAHRENHEIT _bacnet.UNITS_DEGREE_DAYS_CELSIUS_swigconstant(_bacnet) UNITS_DEGREE_DAYS_CELSIUS = _bacnet.UNITS_DEGREE_DAYS_CELSIUS _bacnet.UNITS_DEGREE_DAYS_FAHRENHEIT_swigc...
gds_collector_=None): if nodeName_ == 'Id': value_ = child_.text value_ = self.gds_parse_string(value_, node, 'Id') value_ = self.gds_validate_string(value_, node, 'Id') self.Id = value_ self.Id_nsprefix_ = child_.prefix elif nodeName_ == 'Description': value_ = child_.text value_ = self.gds_parse_string(value...
+ 10213.28554621100 * x) L1 += 0.00000001154 * mu.cost(4.14326179244 + 6261.74020952440 * x) L1 += 0.00000001306 * mu.cost(3.67645557029 + 2301.58581590939 * x) L1 += 0.00000001145 * mu.cost(5.12292846748 + 4562.46099302120 * x) L1 += 0.00000001275 * mu.cost(5.14333847164 + 2693.60159338500 * x) L1 += 0.0000000091...
# 338 None, # 339 None, # 340 None, # 341 None, # 342 None, # 343 None, # 344 None, # 345 None, # 346 None, # 347 None, # 348 None, # 349 None, # 350 None, # 351 None, # 352 None, # 353 None, # 354 None, # 355 None, # 356 None, # 357 None, # 358 None, # 359 None, # 360 None, # 361 None, # 362 N...
<reponame>mbosio85/ediva ## how we measure the similarity between two lists w/ IC per each node ## we have a DAG strucutre ## goal is for each Gene !! output a 'semantic distance' # based on https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2756558/ [but different] # with this two equal nodes will have distance '0' # maximu...
for the lowest section type, if there are section types in `otext.tf`. But more types can be declared as verselike, e.g. `halfverse` in the [bhsa](https://github.com/annotation/app-bhsa/blob/master/code/config.yaml). --- ### `wrap` Pretty: whether the child displays may be wrapped. Default: : boolean * `true` if...
ll > 0.49 * length[ii]: r = 0.49 * length[ii] / tt[ii] ll = 0.49 * length[ii] else: r = radii[jj][ii] if ll > 0.49 * length[ii + 1]: r = 0.49 * length[ii + 1] / tt[ii] new_points.extend( r * dvec[ii] / ct[ii] + self.polygons[jj][ii] + numpy.vstack((r * numpy.cos(a), r * numpy.sin(a))).transpose() ) else: n...
<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- # # SolarEdge ModbusTCP # # Source: https://github.com/addiejanssen/domoticz-solaredge-modbustcp-plugin # Author: <NAME> (https://addiejanssen.com) # License: MIT # """ <plugin key="SolarEdge_ModbusTCP" name="SolarEdge ModbusTCP" author="<NAME>" version="1.0...
jobname="{rulename}.{jobid}", printreason=False, quiet=False, printshellcmds=False, cluster_config=None, local_input=None, restart_times=None, keepincomplete=False, ): self.workflow = workflow super().__init__( workflow, dag, None, jobname=jobname, printreason=printreason, quiet=quiet, printshellcmds=...
}, { "id": 167, "atrr": { "color": "verde", "size": "xxl", "brand": "nike", "precio": 1540 } }, { "id": 168, "atrr": { "color": "morado", "size": "xs", "brand": "blue", "precio": 4444 } }, { "id": 169, "atrr": { "color": "morado", "size": "xs", "brand": "polo", "precio": 15000 } }, { "id": ...
"Finished minimization procedure for experiment {exp_key}.".format( exp_key=exp_key ) ) logger.debug("Terminating mongod process.") mongod_process.terminate() # cleanup processes, threads and files _cleanup_processes_files() return trials @_cleanup_decorator def _fmin_parallel( queue: multiprocessing.Queue...
Event.ON_EPOCH_END) \ .with_event_handler( PlotCustomLinePlotWithLegend(visdom_logger, "Jensen-Shannon Divergence", every=1, params={"title": "Jensen-Shannon Divergence on test data per Epoch", "legend": ["Inputs", "Normalized"]}), Event.ON_TEST_EPOCH_END) \ .with_event_handler( PlotCustomLinePlotWithLegend(visdo...
from builtins import isinstance from copy import copy from math import ceil from typing import Union, Tuple from hwt.code import Switch, Concat from hwt.hdl.constants import INTF_DIRECTION from hwt.hdl.frameTmpl import FrameTmpl from hwt.hdl.transTmpl import TransTmpl from hwt.hdl.typeShortcuts import vec from hwt.hdl...
""" Holds all combat effects logic Inflict is to cause an affliction and add a status effect Apply is to do something right away All apply_* functions take these inputs and give these outputs: apply_*(player: Player, rules: dict, left: bool) -> EffectReturn: :param player: The player being affected :param rules: T...
invalid type') def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _tsubasa.Slice_int_set(self.handle, idx, value) return raise IndexError('slice index out of range') def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Sl...
# -*- coding: utf-8 -*- import functools import os import sys import time from operator import itemgetter import warnings from threading import Lock import asyncio import sqlalchemy from sqlalchemy import event, inspect, orm from sqlalchemy.engine.url import make_url from sqlalchemy.ext.declarative import DeclarativeMe...
2*m.b23*m.b163 + 2*m.b23*m.b165 + 2*m.b23*m.b166 + 2*m.b23*m.b168 + 2*m.b23*m.b170 + 2*m.b23*m.b171 - 2*m.b23*m.b173 - 2*m.b23* m.b176 + 2*m.b23*m.b177 + 2*m.b23*m.b178 - 2*m.b23*m.b181 - 2*m.b23*m.b182 - 2*m.b24*m.b95 - 5 *m.b24 - 2*m.b24*m.b96 - 2*m.b24*m.b97 - 2*m.b24*m.b98 + 2*m.b24*m.b99 + 2*m.b24*m.b100 - 2* ...
<filename>packages/gst-editing-services/gst_conan/build/__init__.py from collections import OrderedDict as odict from conans import ConanFile import fnmatch import os import re import shutil import sys import traceback from .PkgConfigFile import PkgConfigFile from .. import base from .. import configuration def cona...
* 1j * t_values[37])) + (R39 / (1 + w * 1j * t_values[38])) + (R40 / (1 + w * 1j * t_values[39])) + (R41 / (1 + w * 1j * t_values[40])) + (R42 / (1 + w * 1j * t_values[41])) + (R43 / (1 + w * 1j * t_values[42])) + (R44 / (1 + w * 1j * t_values[43])) + (R45 / (1 + w * 1j * t_values[44])) + (R46 / (1 + w * 1j * t...
in 1.5 Parameters ---------- ax : `Axes` an Axes instance to plot to opens : sequence sequence of opening values closes : sequence sequence of closing values highs : sequence sequence of high values lows : sequence sequence of low values ticksize : int size of open and close ticks in points colorup : c...
# A script to help doing the deliveries. # Now using the Casava directory structure # The user is asked to provide a project ID, a run name, and an UPPMAX project import sys import os import glob import re import grp from datetime import datetime import argparse import stat from subprocess import check_call, CalledPro...
""" response = yield { "method": "DOM.copyTo", "params": filter_none( { "nodeId": int(nodeId), "targetNodeId": int(targetNodeId), "insertBeforeNodeId": int(insertBeforeNodeId) if insertBeforeNodeId else None, } ), } return NodeId(response["nodeId"]) def describe_node( nodeId: Optional[NodeId] = None, b...
<gh_stars>0 #! /usr/bin/python # # Python ctypes bindings for VLC # Copyright (C) 2009 the VideoLAN team # $Id: $ # # Authors: <NAME> <olivier.aubert at liris.cnrs.fr> # # 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 F...
int_tx['value'] = csv_tx['value'] int_tx['input'] = csv_tx['input'] int_tx['output'] = csv_tx['output'] int_tx['traceType'] = csv_tx['trace_type'] int_tx['callType'] = csv_tx['call_type'] int_tx['rewardType'] = csv_tx['reward_type'] int_tx['gas'] = csv_tx['gas'] int_tx['gasUsed'] = csv_tx['gas_used'] tx_hash = ...
# encoding: utf-8 """ Tests of fairgraph.electrophysiology module, using a mock Http client which returns data loaded from the files in the test_data directory. """ from fairgraph.base import KGQuery, KGProxy, as_list, Distribution from fairgraph.commons import BrainRegion, CellType, QuantitativeValue from fairgraph.c...
None if 'job' in local_var_params: body_params = local_var_params['job'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501...
<gh_stars>1-10 # -*- coding: utf-8 -*- # Licensed under a MIT style license - see LICENSE.rst """Download BOSS data files from a remote server. The remote module is responsible for downloading data files into a local filesystem using a directory layout that mirrors the remote data source. Most scripts will create a s...
<reponame>Jmahaja1/genieparser # Python import unittest from unittest.mock import Mock # ATS from pyats.topology import Device # Metaparser from genie.metaparser.util.exceptions import SchemaEmptyParserError from genie.libs.parser.junos.show_ldp import (ShowLDPSession, ShowLdpNeighbor, ShowLdpSessionIpaddressDetail...
# Copyright 2018 Google LLC 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 law or agreed...
if not self.__bool__(): self.a, self.b, self.c, self.d, self.e = 0, 1, 1, 0, 1 elif int(self) == self: self.a, self.b, self.c, self.d, self.e = int(self), 1, 1, 0, 1 elif int(self.b) != self.b or int(self.c) != self.c or int(self.d) != self.d or int(self.e) != self.e: self.a, self.b, self.c, self.d, self.e = self....
preferred_lifetime: The preferred lifetime value for this roaming host object. pxe_lease_time: The PXE lease time value for this roaming host object. Some hosts use PXE (Preboot Execution Environment) to boot remotely from a server. To better manage your IP resources, set a different lease time for PXE boot reques...
<gh_stars>1-10 #!/usr/bin/env python import sys import logging import argparse import pandas as pd from cobindability.BED import compare_bed,peakwise_ovcoef,cooccur_peak,srog_peak #from cobindability.ovpmi import cal_pmi from cobindability.bw import bigwig_corr from cobindability.ovstat import ov_stats from cobindabil...
<filename>h1/api/provider_project_agent_api.py<gh_stars>0 """ HyperOne HyperOne API # noqa: E501 The version of the OpenAPI document: 0.1.0 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from h1.api_client import ApiClient, Endpoint as _Endpoint from h1.model_ut...
negotiation are set on the request which will be responded to with the guarded resource. """ renders = [] portal = self.createPortal( lambda: SillyRealm( anonymousAvatarFactory=lambda: InspectfulPage(renders))) channel = self.createGuard(portal) request = channel.makeFakeRequest( '%s/?foo=1&bar=2' % self.getG...
0.53, 0.2)) fd(1) color((0.09, 0.22, 0.5)) fd(3) color((1.0, 1.0, 1.0)) fd(4) color((0.52, 0.59, 0.74)) fd(1) color((0.09, 0.22, 0.5)) fd(2) color((0.98, 0.74, 0.0)) fd(17) color((0.97, 0.73, 0.0)) fd(1) color((0.09, 0.22, 0.5)) fd(2) color((0.0, 0.0, 0.0)) fd(20) gt(-128.0,17.5) fd(19) color((0.09, 0.22, 0.5)) fd(2) c...
key_path = os.path.join(directory, 'skein.pem') cert_bytes = self._get_bytes('cert') key_bytes = self._get_bytes('key') lock_path = os.path.join(directory, 'skein.lock') with lock_file(lock_path): for path, name in [(cert_path, 'skein.crt'), (key_path, 'skein.pem')]: if os.path.exists(path): if force: os.unlin...
import logging import math import os import pickle import random from enum import Enum from pathlib import Path from queue import Queue import numpy as np import torch from Utils.data_utils import change_win_to_unix_path_if_needed class FileSetIterator: """ An iterator for samples stored in a set of files. The Fi...
(self.__class__, self.thrift_spec))) return oprot.writeStructBegin('TDdlExecRequest') if self.protocol_version is not None: oprot.writeFieldBegin('protocol_version', TType.I32, 1) oprot.writeI32(self.protocol_version) oprot.writeFieldEnd() if self.ddl_type is not None: oprot.writeFieldBegin('ddl_type', TType.I3...
import numpy as np import pandas as pd import math import matplotlib.pyplot as plt import yfinance as yf from pandas_datareader import data as web import datetime as dt from empyrical import* import quantstats as qs from darts.models import* from darts import TimeSeries from darts.utils.missing_values import...
'status': 'noexec'}, {'date': 'dayb1', 'status': 'warning'}, {'date': 'dayb2', 'status': 'ok'}, {'date': 'dayb3', 'status': 'ok'}, {'date': 'dayb4', 'status': 'ok'}, {'date': 'dayb5', 'status': 'warning'}, {'date': 'dayb6', 'status': 'fail'}, {'date': 'dayb7', 'status': 'ok'}, {'date': 'dayb8', 'status': 'ok'},...
horizontal rules between rows in report mode.""" ULC_ICON = wx.LC_ICON ULC_SMALL_ICON = wx.LC_SMALL_ICON ULC_LIST = wx.LC_LIST ULC_REPORT = wx.LC_REPORT ULC_TILE = 0x10000 ULC_ALIGN_TOP = wx.LC_ALIGN_TOP ULC_ALIGN_LEFT = wx.LC_ALIGN_LEFT ULC_AUTOARRANGE = wx.LC_AUTOARRANGE ULC_VIRTUAL = wx.LC_VIRTUAL ULC_EDIT_LABELS =...
# -*- coding: utf-8 -*- # Copyright 2018 Cereproc Ltd. (author: <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 # # THIS CODE IS PROVIDE...
<filename>LP.py # -*- coding: utf-8 -*- """ This is an implementation of a classical linear program solvable due to the two -phase simplex algorithm. We assume in the simplex algorithm that the box restrictions are given as 0 <= x < +inf. @author: Ina """ import numpy as np from Exceptions import InfeasibleProble...
rgb(255, 0, 0); }\n" "QPushButton:hover { background-color: rgb(255, 255, 255); }")) self.gb_pb_buy_volume_2_2_5.setText(_fromUtf8("")) self.gb_pb_buy_volume_2_2_5.setObjectName(_fromUtf8("gb_pb_buy_volume_2_2_5")) self.gb_pb_buy_volume_row_minus_2_5 = QtGui.QPushButton(self.gb_ETFOrder_5) self.gb_pb_buy_volume_row...
first_record: msg = ", ".join(data) datafile.write(", %s" % msg) else: first_record = False msg = ", ".join(data) datafile.write(msg) offset += chunk_size # Close the JSON for this table section datafile.write("]}") db.session.execute("DELETE FROM %s WHERE time < :time AND instrument_id = :id" % (table,), d...
<reponame>jasonplato/High_SimulationPlatform from __future__ import division, print_function, absolute_import import numpy as np from highway_env import utils from highway_env.envs.abstract import AbstractEnv from highway_env.road.lane import LineType, StraightLane, SineLane, CircularLane from highway_env.road.road im...
<reponame>SimplyVC/panic import copy import json import logging import unittest from datetime import datetime from datetime import timedelta from unittest import mock from unittest.mock import call import pika import pika.exceptions from freezegun import freeze_time from parameterized import parameterized from src.al...
# Copyright 2019 DeepMind Technologies Limited. 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 appl...
utils._eval_generic_conditions( rule, self.course, self.participation, now_datetime, self.flow_id, self.login_exam_ticket)) def test_if_signed_in_with_matching_exam_ticket(self): rule = utils.FlowSessionRuleBase() rule.if_signed_in_with_matching_exam_ticket = True now_datetime = now() - timedelta(days=2) # log...
= True timerT = False while True: #get wake word local_request = wake_word(command= 'request') if voice == True: text = record_audio() text = get_text(text) else: text = input(f'{local_request.capitalize()}: ') local_request = wake_word(command= 'request') text = f'{local_request} {text}' text = str(text.l...
#!/usr/bin/env python3 from nistats import regression from nistats import reporting from nistats.design_matrix import make_first_level_design_matrix import nibabel as nb import numpy as np import os, pandas, sys, pdb, argparse, copy, scipy, jinja2 from os.path import join as pjoin from nilearn import plotting from nile...
import ida_funcs import ida_bytes import idc import ida_search import idaapi import ida_xref import ida_segment import ida_offset import ida_kernwin from idaapi import BADADDR from ida_search import SEARCH_DOWN, SEARCH_UP import ida_auto import IDAPatternSearch_utils.ida_common as ida_common import sys import os impo...
<gh_stars>1-10 # encoding: utf8 # Copyright (c) 2020 <NAME> and <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 the rights # to use...
+ p + "_val |-> s_eventually(!" + p + "_val || "+handshakes[p]+"));\n") # Assert liveness! prop.write("// Assert that every request has a response and that every reponse has a request\n") prop.write("as__" + name_tid + "_eventual_response: assert property (|" + name_tid + "_sampled |-> s_eventually(" + q + "_val") ...
<reponame>thbom001/improver # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown copyright. The Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
#!/usr/bin/env python ''' ---------------- About the script ---------------- Assignment 5: CNNs on cultural image data This script builds a deep learning model using convolutional neural networks which classify Impressionism paintings by their respective artists. It uses LeNet architecture for CNN. Preprocessing ...
grid self.ciGui.config(menu=self.menubar) #instructive labels self.instructions = Text(self.gridframe, bd=4, width=20, font=('Helvetica', 12), wrap=WORD) f = open('instructions.txt', 'r') instruct = f.read() f.close() self.instructions.insert('1.0', instruct) self.i_scroll = Scrollbar(self.gridframe) self.in...
in the LSTM layer 'lr': float Learning rate 'dropout': float Dropout in the LSTM layer 'optimizer': class Keras optimizer function 'losses': func Keras loss function 'activation': func Keras activation in each layer 'last_activation': str Keras activation in the output layer prop_grid: float proportion of...
#!/usr/bin/python # -*- coding: utf-8 -*- import numpy as np import pandas as pd import quantipy as qp from collections import OrderedDict from quantipy.core.tools.qp_decorators import * import copy as org_copy import warnings import re from quantipy.core.tools.view.logic import ( has_any, has_all, has_count, not...
argument `machine`.\n" def test_handle_info_abbreviated(shell): with patch("hera.debugger.shell.Shell.handle_info") as mock_handle_info: shell.handle_command("i") assert mock_handle_info.call_count == 1 def test_handle_list(shell, capsys): shell.handle_command("list") captured = capsys.readouterr().out asser...
<filename>BUILDER/tools/toolkit.py print "Loading libraries" from PIL import Image,ImageTk,ImagePalette from ffmpy import FFmpeg from itertools import chain import Tkinter as tk import sys,os,ctypes,subprocess,getopt,shutil,struct,time,colorsys np = os.path.normpath cwd = os.getcwd() TEMP_DIR = np(cwd+"/obj/") TEMP_...
: List[str, ..., str]; default=None should the stress? be printed; {YES, NO} None : [NO] * nplies nsm : float; default=0. nonstructural mass per unit area sb : float; default=0. Allowable shear stress of the bonding material. Used by the failure theory ft : str; default=None failure theory; {HILL, HOFF, TSAI, ...
assert "name" not in kw kw ["name"] = name = self.__class__.__name__.lower () self.abbr = name.rsplit ("_", 1) [0] self.__super.__init__ (** kw) # end def __init__ def _get_default (self) : import locale return locale.getpreferredencoding () # end def _get_default # end class _Encoding_ class _Number_ (_Spec...
[[] for _ in range(K)] for i_state in range(K): if state_indices[i_state].shape[0] > 0: state_lens = np.diff(state_indices[i_state][:, 1:3], axis=1) over_idxs = state_lens > min_threshold over_threshold_instances[i_state] = state_indices[i_state][over_idxs[:, 0]] np.random.shuffle(over_threshold_instances[i_state...
<reponame>djarpin/sagemaker-python-sdk # Copyright 2017 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....
- err_q else 180 - err_q err = [err_t, err_q] if np.isnan(err_t) or np.isnan(err_q): print('pose_est=\n', pose2) print('pose=\n', pose1) return err def err_plot(): # Test 1 # Define object points and image points obj_pts = np.random.randint(-40, 40, [n, 3]) obj_pts = obj_pts.astype(float) obj_pts[0, :] ...
repetition ... numpy.array([0., 1., 2., -1., 0.]), 'test', (-2, 2)) Traceback (most recent call last): ... RuntimeError: duplicates in test dimension: [0.] """ # check for values outside of limits if limits is not None: if np.amin(dimension) < limits[0] or np.amax(dimension) > limits[1]: raise RuntimeError(f"{...
<reponame>gorpoorko/Bot-Tcxs-Heroku # -*- coding: utf-8 -*- #███╗ ███╗ █████╗ ███╗ ██╗██╗ ██████╗ ██████╗ ███╗ ███╗██╗ ██████╗ #████╗ ████║██╔══██╗████╗ ██║██║██╔════╝██╔═══██╗████╗ ████║██║██╔═══██╗ #██╔████╔██║███████║██╔██╗ ██║██║██║ ██║ ██║██╔████╔██║██║██║ ██║ #██║╚██╔╝██║██╔══██║██║╚██╗██║██║██║ ██║ ██║██║╚██╔╝██...
#!/usr/bin/env python # Licensed under a 3-clause BSD style license, see LICENSE. """ Tests for the skhep.math.vectors module. """ # ----------------------------------------------------------------------------- # Import statements # ----------------------------------------------------------------------------- import p...
<filename>src/players.py """players module. Used for players data processes """ import numpy as np import pandas as pd import src.config as config import src.utilities as utilities from src.utilities import logging pd.set_option("display.max_columns", 500) pd.set_option("display.expand_frame_repr", False) # master_...
from manim_imports_ext import * import scipy.stats CASE_DATA = [ 9, 15, 30, 40, 56, 66, 84, 102, 131, 159, 173, 186, 190, 221, 248, 278, 330, 354, 382, 461, 481, 526, 587, 608, 697, 781, 896, 999, 1124, 1212, 1385, 1715, 2055, 2429, 2764, 3323, 4288, 5364, 6780, 8555, 10288, ...
<reponame>induane/harrenrpg<filename>src/pyscroll/orthographic.py # Standard import logging import math import time from itertools import chain, groupby, product from operator import gt, itemgetter # Third Party from pygame import Rect, Surface, transform, SRCALPHA # Project from .quadtree import FastQuadTree from .l...
import pandas as pd import pytest from config import proteoforms, proteins, genes, sm from lib.graph_database_access import fix_neo4j_values, get_low_level_pathways, \ get_reactions_by_pathway, get_pathways, get_reactions, get_complexes, get_complex_components_by_complex, \ make_proteoform_string, get_participants_b...
#!/usr/bin/python3 import argparse, glob, os, sys, shutil import datetime, dateutil.parser, pytz, time import pydoc import requests, json import sqlite_api from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.firefox.options import Options from selenium.webdriver.comm...