text
stringlengths
6.04k
39.5k
# ##### 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 distrib...
# Simulates a network with nodes, where each node can be either a # transmitter or receiver (but not both) at any time step. The simulation # examines the coverage based on the signal-to-interference ratio (SINR). # The network has a random medium access control (MAC) scheme based on a # determinantal point process, as...
import sys from mattermostdriver import Driver from jira import JIRA from datetime import datetime import urllib3 import json import re import webhook import requests def getAdjustDict(): adjust_dict = {'h1\. ': '## ', 'h2\. ': '## ', 'h3\. ': '### ', 'h4\....
# -*- coding: utf-8 -*- from six.moves import cStringIO as StringIO import codecs import collections import datetime import imghdr import json import logging import os import pkg_resources import pprint import re import six import socket import subprocess import sys import unittest import uuid from jinja2 import Temp...
# FinSim # Copyright 2018 <NAME>. All Rights Reserved. # NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, ...
# -*- coding: utf-8 -*- import librosa.display import librosa as lb import os import numpy as np import pickle import matplotlib.pyplot as plt import time import multiprocessing import itertools import sys from collections import OrderedDict from more_itertools import unique_everseen from scipy.stats import skew from ...
import re import itertools import os import pandas as pd import numpy as np from prettytable import PrettyTable from tqdm import tqdm def get_char(seq): """split string int sequence of chars returned in pandas.Series""" chars = list(seq) return pd.Series(chars) class SeqProcessConfig(object): def __i...
from __future__ import print_function import os import warnings import shutil import re import numpy as np import sami from astropy.io import fits class Tester(): """This class handles the testing of the SAMI pipeline. To run it requires additional data: 1) the folder ``sami_ppl_test_data``, i.e. th...
import numpy as np import scipy.stats as stat from utils import dichotomic_search """ Implementation of last particle variant """ def ImportanceSplittingLp(gen,kernel,h,tau=0,N=100,s=0.1,decay=0.9,T = 20, accept_ratio = 0.9, alpha_est = 0.95, alpha_test=0.99,verbose=1, gain_thresh=0.01, check_every=3, p_c = 10**(-2...
from past.builtins import basestring from builtins import object from itertools import chain import re # from copy import copy import operator from collections import OrderedDict from nineml.exceptions import ( NineMLUsageError, NineMLNameError, NineMLInvalidElementTypeException) from .visitors.cloner import Cloner...
#!/usr/local/bin/python import pybullet import time import pybullet_data import math, random import sys import numpy import OpenGL import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * import ctypes from OpenGL.GL import shaders import render.cubeRender as cubeRender import rende...
# # Copyright (c) 2014, 2016, 2018, 2020 LexisNexis Risk Data Management Inc. # # This file is part of the RadSSH software package. # # RadSSH is free software, released under the Revised BSD License. # You are permitted to use, modify, and redsitribute this software # according to the Revised BSD License, a copy of wh...
import threading import numpy as np import time import rospy from sensor_msgs import point_cloud2 from std_msgs.msg import Header from sensor_msgs.msg import PointCloud2, PointField from stella_nav_core.geometry_utils import GeometryUtils from stella_nav_core.config import CostConfig, MotionConfig class State(object)...
# ExportSQLite: SQLite export plugin for MySQL Workbench # # Copyright (C) 2015 <NAME> (Python version) # Copyright (C) 2009 <NAME> (Original Lua version) # # 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 F...
# Bedlam is a trivial game framework. # It is based, very loosely, on Phaser (see https://phaser.io). # Copyright (c) 2020,2021 <NAME> # __pragma__('skip') from typing import Optional, List, Dict document = window = Math = Date = console = XMLHttpRequest = JSON = 0 # Prevent complaints by optional static checker ...
import numpy as np from os.path import join from os import listdir from .utils import * from sklearn.preprocessing import normalize from sklearn.preprocessing import scale from sklearn.preprocessing import MinMaxScaler from scipy.signal import resample from scipy.signal import decimate import warnings def load_data():...
""" Ref: https://github.com/htwang14/CAT/blob/1152f7095d6ea0026c7344b00fefb9f4990444f2/models/FiLM.py#L35 """ import numpy as np import torch.nn as nn from torch.nn import functional as F from torch.nn.modules.batchnorm import _BatchNorm class SwitchableLayer1D(nn.Module): """1-dimensional switchable layer. T...
#!/usr/bin/python3 import argparse from huepy import * import sys import importlib import os import base64 import pyperclip import subprocess from terminaltables import SingleTable import random import socket #import atexit POXSSON_PATH = os.path.realpath(__file__).replace("poxsson.py", "") #Absolute path of the projec...
# -*- coding: utf-8 -*- # # Code from page 179 class Toy(object): def __init__(self): self._elems = [] def add(self, new_elems): """new_elems is a list""" self._elems += new_elems def size(self): return len(self._elems) # print(type(Toy)) # print(type(Toy.__init__), type(To...
from copy import deepcopy from logics.utils.parsers import parser_utils from logics.classes.exceptions import NotWellFormed from logics.classes.predicate import PredicateFormula from logics.utils.parsers.standard_parser import StandardParser class PredicateParser(StandardParser): """Parser for predicate language...
#!/usr/bin/env/python3.9 # # Made by EtcAug10 import requests as req, os, re banner = """ ----------------- -- --- | ------------ -----------| --- SQLi CMS Lokomedia - | ------- by EtcAug10 -----| --- -------------------| """ admin = [ 'adm/', '_adm_/', '_admin_/', '_administrator_/', 'operator/', ...
import os import time import subprocess import pyblish.api class MyAction(pyblish.api.Action): label = "My Action" on = "processed" def process(self, context, plugin): self.log.info("Running!") class MyOtherAction(pyblish.api.Action): label = "My Other Action" def process(self, contex...
#!/usr/bin/python3 # wucheng August 8, 2019 # sockmetrics.py --- collect sock communication info among hosts # version 0.9 # two methods to output results: # 1. to screen # 2. to TDengine, a kind of structured time series db # please run ./sockmetrics -h to get help # This program bases on https://github.com/ioviso...
# -*- coding: utf-8 -*- """ This file contains implementations of the functions used to train a CNN model: train_cnn - Function used to facilitate the training of the Convolutinal Neural Network model. test_cnn - Function used to facilitate the testing of the Convolutinal Neural Network model. """ # Built-i...
import numpy as np import cv2 import matplotlib.pyplot as plt from collections import deque # Import configuration parameters import config as cfg # Define a class to receive the characteristics of each line detection class Line: def __init__(self, buf_len = 5): # x values of the last n fits of the line ...
""" Provides a default QA configuration for the projects, by reading the configuration file and the environment variables. """ import os import sys import datetime from getpass import getuser from pathlib import Path, PurePosixPath from typing import Dict, Any, Tuple, List, Optional, Union import yaml import click fr...
# -*- coding: utf-8 -*- # distrib.py import pandas as pd import numpy as np import scipy.integrate import scipy.interpolate import matplotlib.pyplot as plt import matplotlib.font_manager as font_manager from .utils import grouper from .plotting import plotVertBar def integrate(xvec, yvec): return abs(scipy.integ...
""" glucoseDataFrame.py Creates a dataframe of glucose related statistics in diabetics for predictive analysis. """ import sys import os import math from datetime import * from dateutil.parser import parse import pandas as pd import numpy as np sys.path.append("..") # proper file path for importing local modules from...
import click import ast import requests import pandas as pd import numpy as np from pysradb.sraweb import SRAweb import requests import pysam import re import pyfastx import pkg_resources # part of setuptools import json import warnings import sys import os from .run_workflow import make_snakes # Allows passing strin...
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """Contains functionality used to submit experiments and manage experiment history in Azure Machine Learning.""" import logging imp...
# ------------------------------------------------------------------------ # GroupFromer # Copyright (c) 2020 SenseTime. All Rights Reserved. # Licensed under the Apache License, Version 2.0 [see LICENSE for details] # ------------------------------------------------------------------------ # Modified from DETR (https:...
import torch import numpy as np import torch.nn as nn import torch.distributed as dist import torch.nn.functional as F from torch import Tensor from typing import Any from typing import Dict from typing import Tuple from typing import Optional from cftool.misc import update_dict from cftool.misc import shallow_copy_d...
#!/usr/bin/python # encoding: utf-8 import torch import albumentations as A import torch.nn as nn from torch.autograd import Variable from torch.utils.data import Dataset import collections from PIL import Image, ImageFilter import matplotlib.pyplot as plt import math import random import numpy as np import cv2 import...
import os from tkinter import * import tkinter.ttk as ttk from tkinter import filedialog as fd import rsa import crypto import logic import dialog window = Tk() # Константы FONT = 11 # Настройки сессии session_frame = LabelFrame(window, text='Настройка сессии', font=f'Arial {FONT + 1}', bg='white') from_label = Lab...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import pandas as pd import numpy as np import scipy import collections import itertools import json from bokeh.transform import linear_cmap, transform from bokeh.palettes import Set3, Viridis256 from bokeh.models import ( LinearColorMapper, ColumnDataSource, Ho...
#!/usr/bin/env python # encoding: utf-8 """ response """ import numpy as np import scipy as sp from scipy import signal, interpolate import pandas as pd import warnings from .utils import (get_proper_interval, double_gamma_with_d, get_time_to_peak_from_timecourse, ...
import subprocess import json import os import csv import numpy as np import pandas as pd import pysam from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord def get_orf(input_genome, output_genome, orf): orf = int(orf) record = SeqIO.read(input_genome, 'fasta') record.seq = re...
from nltk.corpus import wordnet as wn import nltk import numpy as np import pm4py from pm4py.objects.log.log import EventLog from nlp_label_quality.analysis import matrix_eval from typing import Dict, List, Tuple, Union, Any from nlp_label_quality.analysis.attribute_value import Attribute, AttributeValue import tim...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Definition of the NSDE algorithm""" import numpy as np try: from openmdao.utils.concurrent import concurrent_eval except ModuleNotFoundError: import warnings warnings.warn("OpenMDAO is not installed. Concurrent evaluation is not available.") from . import ...
#!/usr/bin/env python3 import dataclasses import enum import json import pathlib import subprocess import textwrap from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, TypeVar import inflection import jinja2 from jinja2 import StrictUndefined PROJECT_ROOT = pathlib.Path(__file__).parent.parent API_INP...
import torch import torch.nn as nn # from torch.nn import init import functools # from torch.autograd import Variable import numpy as np import pdb ############################################################################### # Functions ##############################################################################...
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.foundation # # 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....
import numpy as np import os from scipy.optimize import least_squares, minimize from scipy.special import fresnel def autophase(S): '''Optimize phase of complex data by maximizing the sum of imaginary over sum of real .. math:: \phi = \\arctan \left( \\frac{\sum_i^N \Im(s_i) }{ \sum_i^N \Re(s_i) } \\...
""" Description ----------- Implements variants of the MCC by composing cross-layer models, analysis engines, and steps. :Authors: - <NAME> """ from mcc.model import * from mcc.framework import * from mcc.analyses import * from mcc.simulation import * from mcc.complex_analyses import * from mcc.importexport impo...
import subprocess import os """ Much of the generated code is based on code internal to quickjs with minor changes. Generated IDL files are header files that provide basic declarations and wrappers. The normal function signature for quickjs is... JSValue js_std_gc(JSContext *ctx, JSValueConst this_val, int argc, JS...
""" Includes two functions which use shortest path policies 1) run_sss_curriculum - trains a PyMARL agent using experiences gathered while following an epsilon greedy shortest path policy. 2) mean_sss_time - returns the mean time taken to complete a map while following an epsilon greedy shortest path policy. ...
# encoding: utf-8 from __future__ import unicode_literals class Commands(object): def __init__(self, lang): if lang == "cz": self.add = "add" self.answer = "answer" self.ask = "ask" self.clear = "clear" self.comment = "comment" self.d...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * from typing import Union, Optional ''' IMPORTS ''' import requests import base64 import os import binascii # Disable insecure warnings requests.packages.urllib3.disable_warnings() """ GLOBALS/PARAMS """ # Global anno...
#!/usr/bin/env python # pylint: disable=invalid-name,ungrouped-imports import logging import math import os from importlib import import_module import coloredlogs import numpy as np import tensorflow as tf from scipy.misc import imread from tensorflow.python.framework import dtypes from tensorflow.python.ops import ...
""" 3D Agn spin visualisation """ import logging import os import shutil import corner import matplotlib.lines as mlines import matplotlib.pyplot as plt import numpy as np import pandas as pd import pyvista as pv import scipy.stats from bbh_simulator.calculate_kick_vel_from_samples import Samples from matplotlib impor...
#!/usr/bin/env python3 import discord, configparser, random, re, requests, random from time import sleep class InvalidDieException(Exception): def __init__(self, die, error='invalid'): self.die = die self.error = error def __str__(self): if self.error == 'too many die': retu...
from __future__ import absolute_import, division, print_function from abc import abstractmethod, abstractproperty import numpy as np from keras import __version__ as __keras_version__ from keras import backend as K from keras.layers import Dense, Dot, Dropout, Input, Lambda, TimeDistributed from keras.models import ...
from search import * import heapq # Predicados usados para descrever estado, pre-condições e efeitos class Predicate: def __str__(self): return type(self).__name__ + "(" + str(self.args[0]) + "," + str(self.args[1]) + ")" def __repr__(self): return str(self) def __eq__(self, predicate): ...
from datetime import date from typing import Type import pytest import sympy from sympy import Interval, oo from nettlesome.entities import Entity from nettlesome.predicates import Predicate from nettlesome.quantities import Comparison, Q_, Quantity class TestComparisons: def test_comparison_with_wrong_comparis...
from __future__ import print_function, division from black import out import numpy as np import torch import torch.nn.functional as F import torch.nn as nn import torch from torch.autograd import Variable import torch.nn.functional as F import numpy as np try: from itertools import ifilterfalse except ImportErro...
import sqlite3 import json import logging from ryu.app.wsgi import ControllerBase, WSGIApplication, route from ryu.base import app_manager from ryu.controller import ofp_event from ryu.controller.handler import MAIN_DISPATCHER, CONFIG_DISPATCHER, DEAD_DISPATCHER from ryu.controller.handler import set_ev_cls from ryu.of...
from flask import render_template, url_for, request, Flask from app import app import pandas as pd from flaskext.mysql import MySQL import matplotlib.pyplot as plt from matplotlib.patches import Patch plt.switch_backend('agg') import numpy as np import operator # sorting dictionary import random import string ########...
from __future__ import with_statement # ============================================================================== # GGisy (python v2.7) # # Author: <NAME> (<EMAIL>) # Bugs and errors: https://github.com/Sanrrone/GGisy/issues # # Please type "python GGisy.py -h" for usage help # # ==========================...
from __future__ import annotations import mmap import threading from enum import Enum from itertools import product from pathlib import Path from typing import ( TYPE_CHECKING, Optional, Sequence, Set, Sized, SupportsInt, Union, cast, overload, ) import numpy as np from ._util imp...
# GTA_Hunter pipeline to first blast a query against GTA database to search for GTA homologs and then classifying them using SVM approach # Author: Evolutionary Computational Genomics Lab # Last modified: 6/20/2019 ############### ### IMPORTS ### ############### import os # import sys from Bio.Blast.Applications i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=W0611, W0613, W0621, E1101 from __future__ import unicode_literals import time import json from io import BytesIO import pytest import tabun_api as api from tabun_api.compat import text from testutil import UserTest, load_file, form_intercept, as_gues...
import torch import torch.nn as nn import torch.nn.functional as F from torch import distributed from torch.nn import init from torch.nn.parameter import Parameter from torch.autograd import Function # ********************* range_trackers ********************* class RangeTracker(nn.Module): def __init__(self, q_le...
import datetime import logging import random import re import time from typing import Iterator, List, Union, Dict from urllib.parse import quote import pandas as pd import requests from bs4 import BeautifulSoup from .conn_postgresql import ConnPostgreSQL log = logging.getLogger(__name__) class HhParser: """Пар...
import functools import json import re from collections import Counter import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import seaborn as sns from statics import STRUCTURE_TYPES sns.set_style("whitegrid") plt.rcParams["figure.figsize"] = (18, 12) plt.rcParams["font.size"] ...
# Exhibiter, copyright (c) 2021 <NAME>. # This software may not be used to evict people, see LICENSE.md. # python standard imports from re import search, sub, fullmatch from pathlib import Path from copy import copy # third-party imports from pdfrw import PdfReader, PdfWriter, buildxobj, toreportlab from reportlab.li...
# -*- coding: utf-8 -*- # pylint: disable=invalid-name, too-many-arguments, bad-whitespace # pylint: disable=too-many-lines, too-many-locals, len-as-condition # pylint: disable=import-outside-toplevel """Copyright 2015 <NAME>. FilterPy library. http://github.com/rlabbe/filterpy Documentation at: https://filterpy.rea...
import bisect import copy import hashlib import itertools import json import operator import time from collections import ChainMap import pmdefaults as PM from pmdefaults import * from policy import NEATProperty, PropertyArray, PropertyMultiArray, ImmutablePropertyError, term_separator CIB_EXPIRED = 2 class CIBEntr...
import numpy as np import torch import torch.nn.functional as F import skimage.measure as sk import time import pyrender import pymesh import trimesh from pyemd import emd_samples import chamfer_python import binvox_rw from glob import glob D2R = np.pi/180.0 voxsize = 32 sample_size = 2048 def RotatePhi(phi): ...
"""Off-loaded private stuff from `vtec.py`.""" # pylint: disable=too-many-arguments from datetime import timedelta import itertools import pandas as pd from pyiem.util import LOG # When a VTEC product has an infinity time 000000T0000Z, we need some value # for the database to make things logically work. We arb pick ...
''' Helper class and functions for loading SUN RGB-D objects Author: <NAME> Date: October 2017 Modified by <NAME> ''' import os import sys import numpy as np import pickle import argparse from PIL import Image BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) import sunrgbd_utils as u...
import sys import argparse import subprocess import os import shutil import glob irene_list = ["blackscholes", "bodytrack", "canneal", "dedup"] maxwell_list = ["facesim", "ferret", "fluidanimate", "freqmine"] jen_list = ["raytrace", "streamcluster", "swaptions", "vips", "x264"] suite = { "Maxwell":"intrate", ...
from collections import defaultdict from base.threedi_base.constants import CULVERT_SNAPPED_TABLE_NAME from base.threedi_base import position from base.threedi_base.logger import Logger from base.threedi_base.apps import ThreediBaseConfig as conf from base.threedi_base.exceptions import InsertError logger = Logger.ge...
from __future__ import unicode_literals import copy import importlib import threading from django.db import models, router from django.db.models import Q from django.db.models.fields.proxy import OrderWrt from django.conf import settings from django.contrib import admin from django.utils import six from django.utils....
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Configuration file (powered by YACS).""" import os from pycls.core.io import pathmgr from yacs.config import CfgN...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 <EMAIL> # # 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 limitat...
from __future__ import unicode_literals import os import sys import urllib import datetime import logging import subprocess import eeUtil import time import requests import json # url for bleaching alert data SOURCE_URL = 'ftp://ftp.star.nesdis.noaa.gov/pub/sod/mecb/crw/data/5km/v3.1/nc/v1.0/daily/baa-max-7d/{year}/ct...
import configargparse from lxml import etree, objectify from rich import console from rich.console import Console import importlib.metadata import re __version__ = importlib.metadata.version('camel-xml2dsl') ns = {"camel": "http://camel.apache.org/schema/spring"} console = Console() class Converter: def __init__(...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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 applica...
# # 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, software # ...
#!/usr/bin/env python3 """Check a font family using Google Fonts QA tools. Examples: Check a local family against the same family hosted on Google Fonts: `gftools qa -f [fonts.ttf] -gfb -a -o qa` Check a local family against another local family and generate reports for Font Diffenator only: `gftools qa -f [fonts_a.t...
#!/usr/bin/env python """ zumoco worker Called by AWS Lambda to discover service instances which are then added to AWS CloudWatch and monitored. Copyright 2019 zulily, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ...
"""Command line interface for chalice. Contains commands for deploying chalice. """ import logging import os import platform import sys import tempfile import shutil import traceback import functools import json import botocore.exceptions import click from typing import Dict, Any, Optional # noqa from chalice impo...
"""Manipulating the Sphinx AST with Jupyter objects""" import os import json from pathlib import Path import docutils from docutils.parsers.rst import Directive, directives from docutils.nodes import math_block, image, literal from sphinx.util import parselinenos from sphinx.util.docutils import ReferenceRole from sp...
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
'''Utility functions and classes for handling image datasets.''' import cPickle import cv2 import os.path as osp import numpy as np import tensorflow as tf from config_tfvgg import cfg FLAGS = tf.app.flags.FLAGS def get_facebox_dims(img_shape,face_bbox,target_size,crop_size,spec,crop_ind): face_bbox = np.zeros_li...
#!/usr/bin/env python # * coding: utf8 * ''' cloudb Usage: cloudb enable extensions [--verbosity=<level>] cloudb create schema [--schemas=<name> --verbosity=<level>] cloudb create admin-user [--verbosity=<level>] cloudb create read-only-user [--verbosity=<level>] cloudb create indexes [--verbosity=<level>] ...
''' Utilities for blockchain backup. Copyright 2018-2020 DeNova Last modified: 2020-12-08 ''' import json import os from datetime import timedelta from traceback import format_exc from django.utils.timezone import now from blockchain_backup import __file__ as blockchain_backup_file from blockchain_backu...
"""Generic socket server classes. This module tries to capture the various aspects of defining a server: For socket-based servers: - address family: - AF_INET{,6}: IP (Internet Protocol) sockets (default) - AF_UNIX: Unix domain sockets - others, e.g. AF_DECNET are conceivable (see <socket.h> ...
from abc import ABC, abstractmethod import numpy as np import pandas as pd from pvrpm.core.enums import ConfigKeys as ck from pvrpm.core.case import SamCase from pvrpm.core.utils import sample, get_higher_components from pvrpm.core.modules.monitor import IndepMonitor class Failure(ABC): """ This abstract cl...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\postures\posture_state_spec.py # Compiled at: 2020-04-15 01:17:36 # Size of source mod 2**32: 27750 ...
# $Id: misc.py 8595 2020-12-15 23:06:58Z milde $ # Authors: <NAME> <<EMAIL>>; <NAME> # Copyright: This module has been placed in the public domain. """Miscellaneous directives.""" __docformat__ = 'reStructuredText' import sys import os.path import re import time from docutils import io, nodes, statemachi...
# Import libraries and set random seeds for reproducibility random_seed = 1237 import random random.seed( random_seed ) import numpy as np np.random.seed( random_seed ) import tensorflow as tf tf.set_random_seed( random_seed ) # Import model and instance loader import model from instance_loader import InstanceLoader im...
""" tellotracker: Allows manual operation of the drone and demo tracking mode. Requires mplayer to record/save video. Controls: - tab to lift off - WASD to move the drone - space/shift to ascend/escent slowly - Q/E to yaw slowly - arrow keys to ascend, descend, or yaw quickly - backspace to land, or P to palm-land - en...
# @Author: <NAME> # @Date: 2021-03-22 09:43:07 # @Last Modified by: <NAME> # @Last Modified time: 2021-11-08 15:09:29 #!/usr/bin/env python ## based on: detectron2.modeling.roi_heads.box_head ## based on: detectron2.modeling.roi_heads.fast_rcnn import torch from torch import nn import numpy as np import logging ...
import warnings import numpy as np from sklearn.covariance import oas, ledoit_wolf, fast_mcd, empirical_covariance from .test import is_square # Mapping different estimator on the sklearn toolbox def _lwf(X): """Wrapper for sklearn ledoit wolf covariance estimator""" C, _ = ledoit_wolf(X.T) return C ...
### # Copyright (c) 2002-2004, <NAME> # Copyright (c) 2008-2010, <NAME> # Copyright (c) 2014, <NAME> # 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 source code must ret...
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['previ...
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """Base forecasting module.""" import logging import operator from collections import defaultdict from datetime import datetime from datetime import timedelta from decimal import Decimal from functools import reduce import numpy as np import stats...
#!/usr/bin/env python # import random import numpy as np from copy import copy from bart_utils import empty, Tree, logsumexp, softmax, check_if_zero, get_children_id #from itertools import izip, count from itertools import count class Particle(Tree): def __init__(self, train_ids=np.arange(0, dtype='int'), param=...
#!/usr/bin/env python3 # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2018 # [+] International Business Machines Corp. # # # 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 Lic...