text
stringlengths
8.04k
46.5k
# Copyright 2017 Red Hat, 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 ...
import math import os from PySide2.QtOpenGL import QGLWidget from PySide2.QtWidgets import QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton, QCheckBox, QRadioButton, \ QComboBox, QProgressBar, QTableWidget, QHeaderView, QTableWidgetItem, QFileDialog, QToolButton, QTabWidget, \ QWidget, QListWidget, QLi...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
#!/usr/bin/env python # coding: utf-8 import requests import json import re from flask import Flask, request, abort,current_app #import numpy as np import matplotlib.pyplot as plt import mysql.connector as mariadb import matplotlib.dates as mdates from matplotlib.ticker import MaxNLocator from adjustText import adjust...
from __future__ import print_function import os import sys import time import json import argparse import random random.seed(49999) import numpy numpy.random.seed(49999) import tensorflow tensorflow.set_random_seed(49999) from collections import OrderedDict from zoo.pipeline.api.autograd import * from zoo.pipeline.ap...
#!/usr/bin/env python3 # This file is covered by the LICENSE file in the root of this project. import argparse import os import yaml import numpy as np import pcl # import matplotlib.pyplot as plt # from mpl_toolkits.mplot3d import Axes3D from auxiliary.laserscan import SemLaserScan import random import open3d # from ...
# coding: utf-8 """ flask_oauthlib.provider.oauth2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Implemnts OAuth2 provider support for Flask. :copyright: (c) 2013 - 2014 by <NAME>. """ import os import logging import datetime from functools import wraps from flask import request, url_for, jsonify, json from flask i...
""" webcolors.py by <NAME>. http://pypi.python.org/pypi/webcolors/ License :: OSI Approved :: BSD License v.1.4 Utility functions for working with the color names and color value formats defined by the HTML and CSS specifications for use in documents on the Web. What this module supports -------------------------...
""" Manage DynamoDB Tables ====================== .. versionadded:: 2015.5.0 Create and destroy DynamoDB tables. Be aware that this interacts with Amazon's services, and so may incur charges. This module uses ``boto``, which can be installed via package, or pip. This module accepts explicit DynamoDB credentials but...
""" Created on Thu Jan 26 17:04:11 2017 @author: <NAME>, <EMAIL> Fit unet style nodule identifier on Luna databaset using 8-grid scheme Physical resolution 2x2x2mm Data aggregated, shuffled; wrap augmentation used (swrap) """ import numpy as np from keras.models import load_model,Model from keras.layers import Ma...
""" This module contains all logic necessary to decipher the signature. YouTube's strategy to restrict downloading videos is to send a ciphered version of the signature to the client, along with the decryption algorithm obfuscated in JavaScript. For the clients to play the videos, JavaScript must take the ciphered ver...
# -*- coding: utf-8 -*- import copy import datetime import hashlib import os import sys import jsonschema import yaml import yaml.scanner from jinja2 import Environment from jinja2 import FileSystemLoader from jinja2 import Template import elastalert.alerters.alerta import elastalert.alerters.chatwork import elastale...
# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A class for managing the Linux cgroup subsystem.""" from __future__ import print_function import contextlib import errno ...
#!/usr/bin/env python3 import time import ruamel.yaml as yaml from ruamel.yaml.compat import ordereddict, StringIO from ruamel.yaml.comments import CommentedMap import json import copy import graphql import os import base64 import jsondiff import jwt import queue import random import warnings import pytest import text...
import hashlib import os import subprocess import sys import tempfile import warnings from copy import deepcopy from datetime import datetime from logging import getLogger from time import time, sleep from typing import Optional, Mapping, Sequence, Any, Callable, Union from pathlib2 import Path from ..backend_api imp...
import zlib from decimal import Decimal as D from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.db import models from django.db.models import Sum from django.utils.encoding import python_2_unicode_compatible, smart_text from django.utils.timezone import...
#!/usr/bin/env python3 import argparse import asyncio import atexit from dynaconf import Dynaconf, Validator from dynaconf.base import Settings from dynaconf.utils.boxing import DynaBox import json import logging from .message_mapping import ( get_vast_type_and_value, indicator_to_vast_matcher_ioc, indicat...
# -*- coding: utf-8 -*- # Copyright © 2019 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
import locale import datetime from django.shortcuts import render, redirect from django.views.generic.edit import FormView from django.views.generic import TemplateView from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.mixins import LoginRequiredMixin from pathways.models import Applicati...
#BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
import io import logging import os import platform import queue import re import subprocess import sys import textwrap import threading import time import traceback from queue import Queue from textwrap import dedent from time import sleep from tkinter import messagebox, ttk from typing import Optional from thonny imp...
"""html2text: Turn HTML into equivalent Markdown-structured text.""" import html.entities import html.parser import re import urllib.parse as urlparse from textwrap import wrap from typing import Dict, List, Optional, Tuple, Union from . import config from .elements import AnchorElement, ListElement from .typing impo...
""" Module implementing GAN which will be trained using the Progressive growing technique -> https://arxiv.org/abs/1710.10196 """ import datetime import os import time import timeit import copy import numpy as np import torch as th class Generator(th.nn.Module): """ Generator of the GAN network """ def _...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Process...
import datetime from collections import namedtuple import pytest from past.builtins import unicode # Alias of str in Python 3 from pennsieve.models import ( DataPackage, ModelProperty, ModelPropertyEnumType, ModelPropertyType, ) from tests.utils import create_test_dataset, current_ts, get_test_client...
""" First, enter a width of the graph - the height will be 4/5 of width. To add a graph, click and then type and equation (y=terms of x or x = terms of y) One can also enter circle or circle filled in order to produce a circle or a filled circle. After typing or circle filled, one will be prompted for the radius of th...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2020 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
# coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
import abc import copy import logging import time import weakref import six import kafka.errors as Errors from kafka.future import Future from kafka.protocol.commit import GroupCoordinatorRequest, OffsetCommitRequest from kafka.protocol.group import (HeartbeatRequest, JoinGroupRequest, ...
__author__ = "<EMAIL>" import re import sys from collections import defaultdict, namedtuple from csv import DictWriter from pathlib import Path from typing import Any, Dict, List, Optional, Union from Bio import SeqIO from bx.intervals import IntervalTree from bx.intervals.cluster import ClusterTree from cupcake im...
# This function should run in the context of Ida Pro and outside of Ida Pro # Outside of Ida it should let access to magic numbers, calling to some of # the functions in here should not be possible # DO NOT RUN IT FROM A REMOTE PC - IT IS NOT SECURE (CAN LEAD TO RCE) import sys import os import sark import zlib import...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """Chesapeake Bay High-Resolution Land Cover Project datasets.""" import abc import os import sys from typing import Any, Callable, Dict, List, Optional, Sequence import fiona import numpy as np import pyproj import rasteri...
from tensorflow.keras.layers import Layer # from keras.layers import Layer import tensorflow as tf from util_graphs import trim_padding_boxes, normalize_boxes, shrink_and_project_boxes from losses import focal, iou class MetaSelectInput(Layer): def __init__(self, strides=(8, 16, 32, 64, 128), pool_size=7, **kwarg...
#!/usr/bin/env python3 #####!/usr/local/bin/python3 import os import pytz import click import random import logging import harness import datetime import pandas as pd import numpy as np import ml_metrics as metrics from tqdm import tqdm from uuid import uuid4 from dateutil import parser from config import init_confi...
from __future__ import print_function import argparse import os import shutil import time import random import math import numpy import torch import torch.nn as nn import torch.nn.parallel import torch.nn.functional as F import torch.backends.cudnn as cudnn import torch.optim as optim import torchvision.transforms as...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2020 SURF. # 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, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Contains the :class:`TSSearch` for finding transition states and reaction paths using FSM. """ import glob import logging import os import shutil import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import ard.consta...
""" HandTracker or HandTrakingModule ================================ It is a simple module to detect hands and do simple projects with hand recognition and machine learning. Hand Detector ------------- Uses: 1. To find and detect hand. 2. To find 21 landmarks in each hand. 3. To find the distance between any ...
# Copyright (C) 2015-2019 <NAME> # SPDX-License-Identifier: Apache-2.0 import dolfin import numpy from matplotlib import pyplot from ocellaris.utils import gather_lines_on_root, timeit, ocellaris_error from . import Probe, register_probe INCLUDE_BOUNDARY = False WRITE_INTERVAL = 1 SHOW_INTERVAL = 0 @register_probe...
# coding: utf-8 """ Traitement des VUES """ import re import collections from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, get_object_or_404 from django.urls import resolve from django.http import JsonResponse from django.views.generic import ListView from djan...
"""Train spoken word classifier and test on Flickr-Audio one-shot speech task. Author: <NAME> Contact: <EMAIL> Date: October 2019 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import datetime import functools import os import time from absl impor...
""" Collection of functions used by various tools of the BibTexNanny toolkit. """ import sys import os import re import configparser from collections import OrderedDict, namedtuple, Counter from abc import ABC, abstractmethod from aux import biblib __author__ = '<NAME>' FIELD_ADDRESS = 'address' FIELD_AUTHOR = 'aut...
''' Visualization for RGB results. ''' import sys, os cur_file_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(cur_file_path, '..')) import importlib, time, math, shutil, csv, random import numpy as np import cv2 import torch import torch.nn as nn from torch.utils.data import Dataset...
import argparse from comet_ml import Experiment import numpy as np import copy import scipy.optimize import pandas as pd import operator import scipy.io import scipy import scipy.sparse import time import sys import os import matplotlib.pyplot as plt #Import mmort modules sys.path.append(os.path.abspath(os.path.join(os...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Classes and functions for managing audio devices. """ # Part of the PsychoPy library # Copyright (C) 2002-2018 <NAME> (C) 2019-2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). __all__ = [ 'AudioDeviceInfo', 'A...
import torch import numpy as np import scipy import scipy.stats import scipy.spatial.distance import seaborn as sns import matplotlib import matplotlib.pyplot as plt device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') def mse(x, y): res = (x - y)**2 return res.mean() def diss(divtau, theta)...
""" Geckopush was built for Python 3. Author: <NAME> (<EMAIL>) Git Repo: http://www.github.com/patleeman/geckopush """ import urllib.request import json class Dashboard(object): """ Dashboard object. Used to hold the dashboard's API key and a collection of all the widgets that have been created from thi...
""" QA model code. """ from collections import namedtuple import concurrent.futures import glob import json import os import random import sys import featurize import ops import numpy as np import tensorflow as tf from framework import Model from constants import EMBEDDING_DIM, PAD ModelConfig = namedtuple("QAModel",...
#!/usr/bin/env python """ Looper: a pipeline submission engine. https://github.com/pepkit/looper """ import abc import csv import glob import logging import os import subprocess import sys if sys.version_info < (3, 3): from collections import Mapping else: from collections.abc import Mapping import yaml import...
import streamlit as st import pandas as pd import altair as alt from vega_datasets import data import numpy as np import matplotlib.pyplot as plt from TableData import TABLENONE, TABLEREQUIRED, TABLEVOLUNTARY, TABLEEXPIRED import time # to simulate a real time data, time loop import plotly.express as px # interactive...
# Code Generating Discrete Legendre Orthogonal Polynomials and the # Legendre Delay Network Basis # # <NAME>, December 2020 # # The code in this file is licensed under the Creative Commons Zero license. # To the extent possible under law, <NAME> has waived all copyright and # related or neighboring rights to this code....
# coding: utf-8 """ zweig ~~~~~ :copyright: 2014 by <NAME> :license: BSD, see LICENSE.rst for details """ from __future__ import unicode_literals import os import sys import ast from io import StringIO from contextlib import contextmanager from itertools import chain from functools import reduce __ve...
from typing import List, Union, Tuple, Any, Generator from itertools import chain import warnings import os ECB = 1 CBC = 2 S_box = [ [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76], [0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c...
import os import re #from tqdm import tqdm import numpy as np import pandas as pd import preprocessor as tp pd.set_option('display.max_rows', None) pd.set_option('display.max_columns', None) tp.set_options(tp.OPT.URL,tp.OPT.MENTION) #import matplotlib.pyplot as plt from sklearn.model_selection import train_test_spli...
import pickle import warnings from copy import deepcopy from typing import Iterable, Optional, Union import numpy as np import pandas as pd from copulae.core import is_psd, near_psd from copulae.types import Array from muarch.calibrate import calibrate_data from muarch.funcs import get_annualized_kurtosis, get_annuali...
import os import pyodbc import pandas as pd import numpy as np import warnings from typing import Union from .utils import logging, winreg, find_registry_key, ReaderType logging.basicConfig( format=" %(asctime)s %(levelname)s: %(message)s", level=logging.INFO ) def list_aspen_servers(): warnings.warn( ...
# Copyright 2016 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
from torch.nn.utils.rnn import pad_sequence from torchsummary import summary from gensim.models import Word2Vec from scipy.sparse import csr_matrix from scipy.sparse import vstack as s_vstack import os import time import argparse import warnings from random_walk import random_walk from random_walk_hyper import random...
import parasail from .._util._multiprocessing import EnhancedPool as Pool import itertools from anndata import AnnData from typing import Union, Collection, List, Tuple, Dict, Callable from .._compat import Literal import numpy as np from scanpy import logging import numpy.testing as npt from .._util import _is_na, _is...
import json from datetime import datetime from django.contrib import messages from data.models import Concept, ConceptRelationship from mapping.models import ScanReportTable, ScanReportField, ScanReportValue from mapping.models import ScanReportConcept, OmopTable, OmopField, Concept, StructuralMappingRule from graph...
# from ripe.atlas.sagan import Result from ripe.atlas.cousteau import Probe import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np from collections import Counter from sklearn.mixture import GaussianMixture import urllib.request import json import pickle import decimal from Ollivie...
# Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
import itertools import re import argparse from collections import deque from itertools import combinations import rdkit import rdkit.Chem as Chem from .ifg import identify_functional_groups lg = rdkit.RDLogger.logger() lg.setLevel(rdkit.RDLogger.CRITICAL) patt = r'[C,H][0-9]{2}[0,-1,1]' IsH010 = lambda a: (a.GetS...
from __future__ import absolute_import from __future__ import print_function from __future__ import division import collections import signal import socket import time import msgpack import requests import simplejson import sys import six from paramiko.ssh_exception import NoValidConnectionsError from aetros.utils ...
import torch from torch import nn from torch.nn import functional as F, Parameter import numpy as np def array1d_repr(t, format='{:.3f}'): res = '' for i in range(len(t)): res += format.format(float(t[i])) if i < len(t) - 1: res += ', ' return '[' + res + ']' def array2d_repr(...
#!/usr/bin/env python3 """ Base class for Models. ALL Models should at least inherit from this class When inheriting model_data should be a list of NNMeta objects. See the class for details. """ import logging import os import sys import time from json import JSONDecodeError from shutil import copyfile, copyt...
''' Biblioteca para calculo de refrigeracao regenerativa em motores foguetes bi propelentes <NAME> https://github.com/jeffersonmsb/rocket-cooling-calculator ''' import csv import numpy as np import math import pyCEA from scipy import optimize import os import subprocess def geometry(data_in, data_out): with open(...
# $Id$ # # Copyright (C) 2008-2011 <NAME> # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # from rdkit import Chem from rdkit import RDConfig impor...
""" This is a script to correct sentences heuristically, using abbreviation_json and telex_typing_json file. """ import argparse import json import textdistance import re import unidecode import operator import string import pickle # from tqdm import tqdm from collections import deque vnmese_alphabet_dict = json.load...
import pandas as pd, numpy as np, tensorflow as tf, re, time, sys, contractions, _pickle as pickle, os, nltk, random, string, warnings, os, sys from numpy import newaxis from tensorflow.python.ops.rnn_cell_impl import _zero_state_tensors from nltk.stem.wordnet import WordNetLemmatizer from tensorflow.python.layers.core...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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', ...
# Copyright 2018 The trfl Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
#!/usr/bin/python2 # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """EC-3PO Interactive Console Interface console provides the console interface between the user and the interpreter. It handles the p...
import sys import numpy as np from gcodeBuddy import angle, Arc, centers_from_params class Command: """ represents line of Marlin g-code :param init_string: line of Marlin g-code :type init_string: str """ def __init__(self, init_string): """ initialization method "...
# LIBTBX_SET_DISPATCHER_NAME dials.import from __future__ import absolute_import, division, print_function import logging from collections import namedtuple import six import six.moves.cPickle as pickle from dxtbx.imageset import ImageGrid, ImageSequence from dxtbx.model.experiment_list import ( Experiment, ...
import datetime import hashlib import random import uuid import dateutil import jwt import icalendar import pytz from ed_platform import app, db, ma, RestException, discourse from marshmallow import fields, post_load, post_dump from flask import g class User(): '''Used exclusively to manage the SSO/Shibboleth in...
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # Copyright 2019 New Vector Ltd # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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...
# Lint as: python3 # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2015 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
import sys sys.path.append("..") from common.utils import Node from rust.long_macros import * #%% def paintLineOn(buff, text, indent): buff += indent + text + "\n" return buff def paint_type(typeName): if typeName.value == "Generic": base, *args = typeName.children base, a...
# Copyright 2019 <NAME> and <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 OpenStack Foundation # 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 # # ...
#%% import os cwd = os.getcwd() dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) import argparse import sys import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms import torchvision.utils import numpy as np i...
from pathlib import Path from typing import List from _pytest.fixtures import fixture from requests import Session from keycloak_scanner.scan_base.types import Realm, SecurityConsole, WellKnown, Client from tests.mock_response import MockResponse, RequestSpec, MockSpec # httpclient_logging_patch() @fixture def b...
from collections.abc import Iterable from functools import partial from math import sqrt from numbers import Real from operator import attrgetter from warnings import warn from openmc import ( XPlane, YPlane, Plane, ZCylinder, Cylinder, XCylinder, YCylinder, Universe, Cell) from ..checkvalue import ( check...
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # BitBake Tests for the Data Store (data.py/data_smart.py) # # Copyright (C) 2010 <NAME> # Copyright (C) 2012 <NAME> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General...
#from planenet code is adapted for planercnn code import cv2 import numpy as np WIDTH = 256 HEIGHT = 192 ALL_TITLES = ['PlaneNet'] ALL_METHODS = [('sample_np10_hybrid3_bl0_dl0_ds0_crfrnn5_sm0', '', 0, 2)] def predict3D(folder, index, image, depth, segmentation, planes, info): writePLYFile(folder, index, ima...
#!/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. import logging import os import sys import threading import time import traceback from parlai.messenger.core.agents imp...
import argparse import codecs import csv import datetime import errno import importlib import json import logging import os import shutil import subprocess import sys import traceback from functools import singledispatch from pathlib import Path from typing import ( Any, Iterable, List, Tuple, Union...
##################################################### # # # Source file of the Matrix Elements exports for # # the PyOut MG5aMC plugin. # # # ##################################################...
import os import shutil import re from fontInfoData import getAttrWithFallback, intListToNum, normalizeStringForPostscript from outlineOTF import OutlineOTFCompiler from featureTableWriter import FeatureTableWriter, winStr, macStr from kernFeatureWriter import KernFeatureWriter try: sorted except NameError: def...
from math import log, exp, sqrt, tanh, sin, cos, tan, atan2, ceil, pi import numpy as np from OpenGL.GL import * from PyEngine3D.Common import logger from PyEngine3D.App import CoreManager from PyEngine3D.OpenGLContext import CreateTexture, Texture2D, Texture2DArray, Texture3D, FrameBuffer from PyEngine3D.Render impo...
# Functions to convert HSV colors to RGB colors lovingly ported from FastLED # # The basically fall into two groups: spectra, and rainbows. # Spectra and rainbows are not the same thing. Wikipedia has a good # illustration here # http://upload.wikimedia.org//wikipedia//commons//f//f6//Prism_compare_rainbow_01.png...
import matplotlib.pyplot as plt from matplotlib import colors, ticker, cm import numpy as np from scipy.interpolate import interp1d, CubicSpline def calc_wa(sep, alpha, d_obs): # sep should be in au # alpha should be in degrees # d_obs should be in parsecs # returns wa in radians sep = sep*au_to_m ...
#!/usr/bin/python3 ''' DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited. This material is based upon work supported by the Assistant Secretary of Defense for Research and Engineering under Air Force Contract No. FA8721-05-C-0002 and/or FA8702-15-D-0001. Any opinions, findings, conclusions ...
import os import json import ecco from IPython import display as d from ecco import util, lm_plots import random import matplotlib.pyplot as plt import numpy as np import torch from torch.nn import functional as F from sklearn import decomposition from typing import Optional, List class OutputSeq: def __init__(se...
""" Base classes for representing signals. """ import logging from copy import deepcopy from functools import partial import numpy as np import xarray as xr from ..models.model import Model from scipy.signal import butter, detrend, get_window, hilbert from scipy.signal import resample as scipy_resample from scipy.sig...
from __future__ import print_function, unicode_literals, absolute_import, division import numpy as np import sys import warnings import math from tqdm import tqdm from collections import namedtuple import keras.backend as K from keras.utils import Sequence from keras.optimizers import Adam from keras.callbacks import...
r""" Core module providing cost-to-go function implementation :class:`CostToGo`. """ from __future__ import annotations import warnings import torch from ml_adp.nn import ModuleList, _evaluating import numpy as np import itertools as it import matplotlib.pyplot as plt from contextlib import ExitStack from typing impor...