text
stringlengths
6.04k
39.5k
# -*- coding: utf-8 -*- """ Created on Sun Mar 22 12:58:36 2020 @author: <NAME> """ try: import sim except: print ('--------------------------------------------------------------') print ('"sim.py" could not be imported. This means very probably that') print ('either "sim.py" or ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from types import FunctionType from typing import Dict, List, Optional, Tuple, Union import numpy as np from ax.benchmark import utils from ax.benchmark.benchmark_problem import BenchmarkProblem, SimpleBenchmarkProblem from...
# coding=utf-8 import collections import os import random import re import shutil import subprocess import tempfile import zipfile from RLTest import Defaults from RLTest import Env import shutil import platform from test_helper_classes import SAMPLE_SIZE from includes import * OS = os.getenv('OS') if platform.syste...
import inspect import math # pylint: disable=unused-import, wrong-import-order from typing import Any, Generator, List, Optional, Tuple, Type, Union, Dict, Callable # noqa from esphome.core import ( # noqa CORE, HexInt, ID, Lambda, TimePeriod, TimePeriodMicroseconds, TimePeriodMilliseconds, TimePeriodMinut...
#!/usr/bin/env python # -*- coding: utf-8 -*- # License: BSD-3 (https://tldrlegal.com/license/bsd-3-clause-license-(revised)) # Copyright (c) 2016-2021, <NAME>; <NAME> # Copyright (c) 2022, QuatroPe # All rights reserved. # ============================================================================= # DOCS # ========...
import typing as t from collections import abc from pylox import grammar from pylox.error import LoxParseError from pylox.protocols.interpreter import LoxInterpreterProtocol from pylox.tokens import Token, TokenType MAX_ARGS = 255 class ParseException(BaseException): # noqa: D101 ... class Parser: """ ...
# -*- coding: utf-8 -*- # Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is # holder of all proprietary rights on this computer program. # You can only use this computer program if you have closed # a license agreement with MPG or you get the right to use the computer # program from someone who i...
# -*- coding: utf8 -*- """Different ways to print "Hello world!\n" in Python. Some technique requires modules not in the standard library (numpy) that if they aren't installed they are "emulated". I know that some modules are imported several times, it's just to do that all the code of each Hello world is within the...
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
############################################ # Copyright (C) 2019 FireEye, Inc. # # Author: <NAME> # # ironstrings is an IDAPython script that uses flare-emu (which combines Unicorn and # IDA Pro) to recover stackstrings from malware using code emulation. # # Dependencies: # https://github.com/fireeye/flare-em...
# Adapted from https://github.com/kimiyoung/transformer-xl from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import os from functools import partial from collections import Counter, OrderedDict import pickle import json import multiprocessing as ...
""" A test script for iteratively running a HEC-RAS controller model X number of times. By: Lockwood, Andrews, and Newnam <NAME> for more information contact: <EMAIL> """ # Package Imports import os import time import subprocess from random import uniform from subprocess import CalledProcessErr...
import tables import os import glob # from pprint import pp import time # from astropy.coordinates import Angle import numpy as np import pandas as pd import pymongo import random import json import argparse import traceback import datetime import pytz from numba import jit import typing # from concurrent.futures impor...
""" Copyright 2020 The OneFlow 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 or agr...
# 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 # distributed under the...
import json import os import hashlib from enum import IntEnum from copy import deepcopy from switch import switch from mesh.generic.customExceptions import NodeConfigFileError, TDMAConfigError from nodeConfig_pb2 import NodeConfig_proto configHashSize = 20 # length of configuration hash (SHA1) class ParamId(IntEnum):...
# Python module imports import qrcode from Crypto.PublicKey import RSA from Crypto import Random from cs50 import SQL from threading import Timer import os from tempfile import mkdtemp from ast import literal_eval from werkzeug.security import check_password_hash, generate_password_hash import datetime as dt from pytz ...
"""Abstraction for Arcyd's git operations.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # abdt_git # # Public Classes: # Repo # .is_identical # .get_remote_branches # .checkout_for...
""" Test the ChemStock module """ import pytest import time import serverlib.timelib as timelib import serverlib.yamlutil as yamlutil import serverlib.qai_helper as qai_helper import serverlib.ChemStock as ChemStock import serverlib.tests.test_qai_helper as test_qai_helper withchemstock = pytest.mark.skipif(not p...
# -*- coding: utf-8 -*- from __future__ import print_function import hashlib import logging import xml.dom.minidom from requests import Session from .errors import (InvalidError, LoginError) _LOGGER = logging.getLogger(__name__) def get_text(nodelist): """Get the value from a text node.""" value = [] f...
# -*- coding: utf-8 -*- """ file collects widgets that call matplotlib """ from __future__ import print_function, division, absolute_import from PyQt5.QtCore import * from PyQt5.QtGui import * import numpy as np from matplotlib.backends.backend_qt5agg import\ FigureCanvasQTAgg as FigureCanvas import matplotlib.pyp...
from modules.audit_controller import AuditController from config import CURR_SYSTEM_PLATFORM, ROOT_DIR import getpass from tkinter import * from tkinter import ttk from tkinter import filedialog from tkinter import messagebox from modules.audits.common import * from modules.audits.base_model import BaseTest # UAC el...
import vtk from vtk.util import numpy_support as ns import numpy as np from six.moves import range from .tractography import Tractography from functools import reduce def tractography_from_vtk_files(vtk_file_names): tr = Tractography() if isinstance(vtk_file_names, str): vtk_file_names = [vtk_file...
import os from hashlib import md5 from functools import wraps from nose.tools import assert_in import json from flask import ( jsonify, request, current_app, render_template, redirect, url_for, session, make_response as flask_make_response ) from flask.views import MethodView from logboo...
#!/usr/bin/env python3 import argparse import os import pysam import numpy as np from collections import defaultdict from enum import Enum from .inner import common from .inner import duplication as duplication_ from .inner.genome import Genome, Interval from .inner.alignment import Alignment, Weights from .inner imp...
#!/usr/bin/env python #################### # Required Modules # #################### # Generic/Built-in import os from logging import NOTSET from typing import Dict, List, Union, Any # Libs from flask import request from flask_restx import Namespace, Resource, fields from tinydb.database import Documen...
# Copyright 2019 Xanadu Quantum Technologies 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 agre...
# -*- coding:utf-8 -*- import logging import os import pickle import time from abc import abstractmethod import matplotlib.pyplot as plt import numpy as np import pandas as pd from keras.layers import Dense, Dropout, RepeatVector from keras.layers import LSTM from keras.models import Sequential from sklearn.model_sele...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # """RAMSES RF - a RAMSES-II protocol decoder & analyser. Decode/process a message (payload into JSON). """ import logging import re from datetime import timedelta as td from functools import lru_cache from typing import Any, Optional, Tuple, Union from .address import ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Abstract pattern class definition along with various implementations (regexp, string, functional) """ # pylint: disable=super-init-not-called,wrong-import-position from abc import ABCMeta, abstractmethod, abstractproperty from . import debug from .formatters import de...
# Copyright (c) 2021 War-Keeper import os import sys import discord from discord.ext import commands from discord.utils import get sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import db # ----------------------------------------------------------- # This File contains commands for jo...
import torch from torch.utils.data import Dataset from transformers import AutoTokenizer from tqdm import tqdm from utils.generic_utils import read, match from utils.json_utils import load import os import random import re from torchvision.transforms import transforms from PIL import Image from copy import deepcopy fro...
from tkinter import * import sys from PIL import Image import glob import os root = Tk() aspect_ratio = 1 hasChanged = False isFolder = False image = None images = [] width = StringVar(value="1") height = StringVar(value="1") isAspectRatio = IntVar(value=1) pixels = IntVar() widthEntry = Entry() heightEntry = Entry...
''' Info: This script loads root files containing standard b-tagging information + the IPMP outputs. It turns the data into jet-flat structure, replicates the variable creation and modification that are present in MV2, scales the variables and splits them into training and testing sets. F...
import sys from functools import partial, wraps from mock import patch import ast from sigtools import support, modifiers, specifiers, signatures, _util, _autoforwards from sigtools.tests.util import Fixtures, tup _wrapped = support.f('x, y, *, z', name='_wrapped') def func(*args, **kwargs): pass class Autof...
import sys sys.path.insert(0, "../..") import ply.lex as lex # count variable include = 0 declared_functions = 0 declared_variable = 0 conditional_statement = 0 loop = 0 called_functions = 0 # reserved reserved = ( 'INT', 'RETURN', 'VOID', 'FOR', 'ELSE', 'IF', 'WHILE', 'BREAK', ) # List of token names. This ...
#!/usr/bin/env python3 # vast_pdf: Library of functions to create PDF reports of various type. # Currently only makes invoices. import argparse import datetime import math import time import random from decimal import Decimal import typing import PIL.Image try: from borb.pdf.canvas.color.color import HexColor, X...
"""Functions for modeling the avalanche risk levels """ import sys sys.path.append("/home/daniel/Schreibtisch/Projekte/avalanche-risk") import pickle import numpy as np import pandas as pd import seaborn as sns import re from eda.functions_eda import plot_correlations, plot_missing_values from imblearn.over_samplin...
""" Copyright 2020 The OneFlow 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 or agr...
import os, sys, subprocess, threading, time, math import operator, json, logging from datetime import datetime, timezone, timedelta from uuid import uuid4 import sox, predict, boto3, cfg, requests # overrides predict and forces the next satellite pass 2 seconds from script execution testMode_recording = False # send...
#!/usr/bin/python # -*- coding: utf-8 -*- """Generate template HG-3 images with numbered frames (great for testing) Requires the PIL (pillow) image library package NOTE: This expects the this script file to keep its current relative path to the catsys package. (i.e. /tool/script/<script>.py -> ../../src -> /src(/cats...
# Infinity ErgoDox LCD Editor, by LuX # The program will insert image and color data into pre-compiled *.dfu.bin files # # More info: https://geekhack.org/index.php?topic=82904.0 # AND: https://input.club/forums/topic/ied-lcd-editor-v0-9-gui-editor-to-modify-the-lcd # # Code distributed "as is", use at your own r...
# -*- coding: utf-8 -*- """ Created on Sat Nov 17 19:30:17 2018 @author: Stan This module defines and models the network. It contains a list of nodes and can graphically represent those. Requirements: - Energy consumption: star network?? - Cluster head communicates over LoRa to base - Show d...
#!/usr/local/bin/python3.5 # encoding: utf-8 ''' -- Export metadata from sheepdog is a description It defines classes_and_methods @author: <NAME> @copyright: 2018 UCSC Genomics Institute. All rights reserved. @license: Apache 2 @contact: <EMAIL> @deffield updated: May 22, 2018 ''' import sys impo...
# -*- coding: utf-8 -*- # pylint: disable-msg= """ Created on Tue Jul 8 13:09:54 2014 This module contains the definition of the abstraction pattern representing a trigeminy rhythm. @author: <NAME> """ from kardioml.segmentation.teijeiro.model.automata import ( PatternAutomata, ABSTRACTED as ABS, ENVIRO...
import taichi as ti import numpy as np import math import matplotlib.pyplot as plt # from taichi.type.annotations import ext_arr # ---------------------------------------------------------------------------- # # constant paramters # # --------------------------...
""" A simple Neural Network API. Provides a clean interface for building Deep Feedforward Neural Networks. The network itself is represented by the Dense class, which provides a reference to the first (input) layer. Also provides a selection of methods to implement forwards and backwards backpropagation, fit data and m...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
import osqp import math import numpy as np from scipy import sparse from matplotlib import pyplot as plt # f(x) = 1/2 * x^T * Q * x + p^T * x class SQPSmoother: def __init__(self, points_x, points_y, lb, ub, curvature_limit, smooth_weight, length_weight, distance_weight, slack_weight, fixed_start_end, enable_plot...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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...
import os import pathlib import numpy as np import click import json import torch from rlkit.envs import ENVS from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.torch.sac.policies import TanhGaussianPolicy from rlkit.torch.networks import FlattenMlp, MlpEncoder, RecurrentEncoder, VRNNEncoder from r...
import keras import os, h5py import subprocess import numpy as np import pandas as pd from IPython.display import Image from sklearn.decomposition import PCA # import gpflow import itertools import CMGDB import matplotlib import seaborn as sns import matplotlib.pyplot as plt from matplotlib.patches import Rectangle fr...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2017 <NAME> (Nagoya University) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import argparse import logging import os import sys import time from dateutil.relativedelta import relativedelta from typing import Dict, Tuple, List from functools im...
#!/usr/bin/env python3 import plenoptic as po import torch import matplotlib as mpl import matplotlib.pyplot as plt import itertools import numpy as np def remap_model_name(model_name): """Get a nicer name for use in figures.""" if 'RGC' in model_name: model_name = 'fov_lum(' + model_name.split('scali...
import boto3 import logging import smart_open from datetime import datetime from contextlib import contextmanager from flask import Flask from dataactcore.aws.s3Handler import S3Handler from dataactcore.config import CONFIG_BROKER from dataactcore.interfaces.db import GlobalDB from dataactcore.interfaces.function_bag...
""" Created by <NAME> (Github: AdannaAkwats) """ import re import os from datetime import date, datetime from dateutil import rrule from Months import Month import numpy as np import directories import ast import sys from collections import defaultdict from calendar import isleap """ Script that contains useful functio...
import re from functools import lru_cache import codecs import json import xml.etree.ElementTree as ET # Using global constants rather than passing values around. PHONE_RE = re.compile(r'\+1-\d\d\d-\d\d\d-\d\d\d\d') WRONG_AC_RE = re.compile(r'1*306') # LOWER = re.compile(r'^([a-z]|_)*$') # LOWER_COLON = re.compile(r...
""" Finalfusion Embeddings """ import heapq from dataclasses import field, dataclass from os import PathLike from typing import Optional, Tuple, List, Union, Any, Iterator, Set import numpy as np from finalfusion.io import Chunk, Header, _read_chunk_header, ChunkIdentifier, \ FinalfusionFormatError, _read_require...
#!/usr/bin/env python """ nullseq.py: fast sampling of positive and negative sequence of open-chromain peaks Copyright (C) 2020 <NAME>, <NAME> 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 Soft...
import configparser import string import threading import numpy as np import os from dataclasses import dataclass from logger import Logger config_lock = threading.Lock() from utils.misc import wait, only_lowercase_letters def _default_iff(value, iff, default = None): return default if value == iff else value cla...
#!/usr/bin/env python3 # Acoustics Database Connection Manager import sqlite3 import random import amp.song class DatabaseManager(object): def __init__(self): self.conn = None pass def toDicts(self, rows): # Assume the default will do this for us. return rows def SELECT...
# coding=utf-8 """ Module holding misc algorithms """ import ee import ee.data import math from . import satellite as satmodule if not ee.data._initialized: ee.Initialize() def pansharpen_kernel(image, pan, rgb=None, kernel=None): """ Compute the per-pixel means of the unsharpened bands source: https...
from abc import abstractmethod from logging import Logger from typing import TypeVar, Generic, Type, Callable, Dict, Any, Set, Tuple, List from parsyfiles.global_config import GLOBAL_CONFIG from parsyfiles.converting_core import get_validated_types, S, Converter, get_options_for_id, is_any_type, \ is_any_type_set,...
""" template for further hyper-parameter optimization""" import tensorflow.keras as keras from tensorflow.keras.models import Model from tensorflow.keras.layers import Input, Dense, Flatten, Conv2D, MaxPooling2D, Dropout, Reshape, Dot, Add, Activation import numpy as np import pandas as pd import xarray as xr xr.set...
# -*- coding: utf-8 -*- """ Created on Tue Aug 14 15:37:49 2018 @author: <NAME>(<EMAIL>) """ from tkinter import Menu from tkinter import * import tkinter as tk from tkinter import messagebox from tkinter.ttk import Progressbar from tkinter.filedialog import askopenfilename,askdirectory from tkinter import ttk impor...
# pylint: disable=invalid-name, bad-whitespace, too-many-arguments """ Basic graphics related geometry tools to complement numpy Quaternion, graphics 4x4 matrices, and vector utilities. @author: franco """ # Python built-in modules import math # mainly for trigonometry functions from numbers import Numb...
"""Collates the distributions of the signal-to-noise ratio, 90%-credible sky-area, and measurement errors for different networks. Uses the .npy processed injections data files. Usage: Requires process injections data files to exist. Code structure is similar to plot_collated_detection_rates.py. See run_pl...
from threading import Thread, Event, Timer from scapy.all import sendp from scapy.all import Packet, Ether, IP, ARP, Raw from async_sniff import sniff from cpu_metadata import CPUMetadata from pwospf import * from ipaddr import IPv4Address, IPv4Network import config import time ARP_OP_REQ = 0x0001 ARP_OP_REPLY = 0x0...
# 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 # d...
#coding=utf-8 import numpy as np import math ''' bboxes:[X,4], ymin,xmin,ymax,xmax, relative coordinate ''' def bboxes_jaccard(bboxes1, bboxes2): bboxes1 = np.transpose(bboxes1) bboxes2 = np.transpose(bboxes2) int_ymin = np.maximum(bboxes1[0], bboxes2[0]) int_xmin = np.maximum(bboxes1[1], bboxes2[1])...
# -*- coding: utf-8 -*- ''' Copyright (c) 2016, Virginia Tech All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condi...
# -*- coding: utf-8 -*- """ Various geodetic utilities for ObsPy. :copyright: The ObsPy Development Team (<EMAIL>) :license: GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html) """ from __future__ import (absolute_import, division, print_function, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------- # ファイル名 :rirakkuma.py # 機能概要 :2019ROBOCON(予選用) # ・move_baseを使用 # ・スタート/ゴール地点は"Start_Goal.csv"ファイルで設定する # 作成日時 :2019/08/19 # ------------------------------------------------------...
import os import sys import scipy.io import scipy.misc import matplotlib.pyplot as plt from matplotlib.pyplot import imshow from PIL import Image from nst_utils import * import numpy as np import tensorflow as tf import pprint get_ipython().magic('matplotlib inline') # ## 1 - Problem Statement pp = pprint.Pretty...
import py from py.__.test.outcome import Skipped class TestModule: def test_module_file_not_found(self, testdir): tmpdir = testdir.tmpdir fn = tmpdir.join('nada','no') col = py.test.collect.Module(fn, config=testdir.parseconfig(tmpdir)) py.test.raises(py.error.ENOENT, col.collect) ...
""" """ __version__='192.168.3.11.dev1' import sys import os import logging import pandas as pd import re import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages logger = logging.getLogger('PT3S') try: from PT3S import Rm except ImportError:...
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2021 <NAME> <<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 limitation the rights # ...
#!/usr/bin/env python3 import os, glob, time import pandas as pd import numpy as np import datetime as dt import matplotlib.pyplot as plt plt.style.use('./pltReports.mplstyle') import pygama import waveLibs as wl # import ipdb; ipdb.set_trace() # launch ipython debugger # data_dir = "/Users/wisecg/project/mj60/data"...
import tensorflow as tf import numpy as np #import os, sys, inspect from datetime import datetime import EmotionDetectorUtils """ lib_path = os.path.realpath( os.path.abspath(os.path.join(os.path.split(inspect.getfile(inspect.currentframe()))[0], ".."))) if lib_path not in sys.path: sys.path.insert(0, lib_path...
#!/usr/local/bin/python2.7 """ Copyright (c) 2018 Verb Networks Pty Ltd <<EMAIL>> Copyright (c) 2018 <NAME> <<EMAIL>> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistri...
# encoding: utf-8 # Author: <NAME> # Created: 2021/9/27 """ Build dataset for training and inference. Usage example: python scripts/dataset_ImpliCity/build_dataset.py config/dataset/ImpliCity/ImpliCity.yaml Input: config file (yaml), including data path of: 1. Point cl...
import itertools import math import random import re debug = True debug_probabilities = True # Loaded dynamically. global_components = [] RANKED_CANDIDATES_FILE = "ranked-candidates" CANDIDATE_MATCH_COUNTS_FILE = "match-counts" CANDIDATE_VICTORY_COUNTS_FILE = "victory-counts" # Elo parameters. SPREAD = 400 INITIAL_...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------------------------------------------------- # INFO: # ----------------------------------------------------------------------------------------------------------------------- """ Author: <NAME> L...
from .utils import PyKEArgumentHelpFormatter import time, urllib import sys import numpy as np from astropy.io import fits as pyfits from matplotlib import pyplot as plt from . import kepio from . import kepmsg from . import kepkey __all__ = ['keptrim'] def keptrim(infile, column, row, imsize, outfile=None, kepid=N...
import math import numpy as np import scipy.io import scipy.stats as stat import helpers as util import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm import scipy.optimize as opt import probabilities as prb import inference as infr # generates a bunch of random stimuli and...
"""bcbio run module""" import os import re import yaml import glob from itertools import chain import pandas as pd import datetime from scilifelab.utils.misc import filtered_walk, query_yes_no, prune_option_list from scilifelab.utils.dry import dry_write, dry_backup, dry_unlink, dry_rmdir, dry_makedir from scilifelab....
import math from PyQt5.QtCore import Qt, QSize, QLineF, pyqtSignal, pyqtSlot from PyQt5.QtGui import QIcon, QPixmap, QImage, QPainter, QPen from PyQt5.QtWidgets import ( QWidget, QLabel, QFrame, QDockWidget, QGridLayout, QHBoxLayout, QVBoxLayout, QToolButton, QScrollArea, QSizePo...
import numpy as np import cv2 as cv import time import matplotlib.pyplot as plt import matplotlib # plt.xkcd() def generate_for_box_plot(number_of_steps=10000, start_size=300, end_size=450, step=100, number_of_iterations=15): sequential_times = [] parallel_times = [] grid_sizes = [] for grid_size i...
#!/usr/bin/env python # Copyright 2021 Citrix Systems, Inc. All rights reserved. # Use of this software is governed by the license terms, if any, # which accompany or are included with this software. import copy import cli_lex import nspepi_common as common import check_classic_expr from nspepi_parse_tree import * ...
# -*- coding: utf-8 -*- # @Author: liangou # @Date: 2021-02-25 12:39:08 # @Last Modified by: liangou # @Last Modified time: 2021-04-18 16:32:48 # -*- coding: utf-8 -*- # @Author: liangou # @Date: 2021-01-25 22:08:08 # @Last Modified by: liangou # @Last Modified time: 2021-02-22 20:53:50 import pandas as pd imp...
#-*- coding:utf8 -*- import numpy from scipy.misc import imread from matplotlib import pyplot as plt from PIL import Image from PIL import ImageDraw import re import os from subprocess import call import sys from fix_grammar import TGrammarCorrector from fix_grammar import tokenize from fix_grammar import good_word...
''' Dataset record processing. ''' # standard import os import logging import shutil import re # third party # local from libs import utils from libs import constants as EC from ht_etl import peaks_datasets, sites_dataset, tu_datasets, tss_datasets, tts_datasets def open_excel_file(keyargs): ''' This funct...
from a10sdk.common.A10BaseClass import A10BaseClass class Stats(A10BaseClass): """This class does not support CRUD Operations please use parent. :param stock_advice_and_tools: {"optional": true, "size": "8", "type": "number", "oid": "16", "format": "counter"} :param news_and_media: {"optional": true...
""" @brief Tools to create simulated CCD segment exposures under ideal conditions. Darks, flats, Fe55, etc.. """ from __future__ import print_function from __future__ import absolute_import import os from collections import OrderedDict import datetime import astropy.time import numpy as np import numpy.random as rand...
# -*- coding: utf-8 -*- """ chemreac.integrate ================== This module provides functions for integrating the system of ODEs which the :py:class:`~chemreac.core.ReactionDiffusion` object represents. The main class representing a numerical integration (for a set of parameters) of the system of ODEs is :py:class:...
import unittest from datetime import datetime from typing import Any, ClassVar, Dict, List, Optional, cast from caplena.api.api_exception import ApiException from caplena.controllers import ProjectsController from caplena.filters.projects_filter import ProjectsFilter, RowsFilter from caplena.resources import ProjectDe...
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. import itertools import logging import re from collections import OrderedDict from typing import List, Tuple import mxnet as mx import numpy as np import scipy as sp from mxnet import nd, gluon from data.AugmentedAST import AugmentedAST from da...
""" Converted to pytorch_lightning from: https://github.com/taldatech/soft-intro-vae-pytorch """ import dataclasses from typing import Tuple import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision from torch.utils.data import DataLoader from torchvision import transforms ...
# -*- coding: utf-8 -*- import json import logging from urllib import urlencode from functools import partial import requests class FlipkartAPI(object): """ Flipkart Marketplace Seller API Client. This client provides access to flipkart objects (orders, skus) in a generic way. You can read more...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ isoenum.nmr ~~~~~~~~~~~ This module provides descriptions of coupling combinations that could be observed within NMR experiments. """ import itertools import more_itertools from . import utils class ResonanceAtom(object): """Resonance atom - part of the coup...