text
stringlengths
8.04k
46.5k
#!/usr/bin/python import os import rospkg import rospy import rosbag import math import numpy as np import pandas as pd from gnss_ins_sim.geoparams import geoparams from gnss_ins_sim.geoparams import geomag from gnss_ins_sim.attitude import attitude from gnss_ins_sim.sim import imu_model from gnss_ins_sim.sim impo...
import io import pickle as pk import random import h5py import numpy as np import torch import torch.nn as nn import torch.nn.functional as F # from dataloader import KVReader from PIL import Image from torch.utils.data import DataLoader, Dataset from torchvision import models, transforms, utils from utils import res...
# -------------------------------------------------------------------------- # Core functions to train on NGA data. # -------------------------------------------------------------------------- import gc # clean garbage collection import glob # get global files from directory import random ...
""" Tests for the daemon. Pyro - Python Remote Objects. Copyright by <NAME> (<EMAIL>). """ import time import socket import uuid import pytest import Pyro5.core import Pyro5.client import Pyro5.server import Pyro5.nameserver import Pyro5.protocol import Pyro5.socketutil import Pyro5.serializers from Pyro5.errors imp...
""" Class to perform over-sampling using Geometric SMOTE. This is a modified version of the original Geometric SMOTE implementation. """ # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # License: BSD 3 clause import math import numpy as np from collections import Counter from numpy.linalg import norm from sc...
import math from _queue import Empty from multiprocessing import Process, Queue from flask import Flask, jsonify, request import re import os import sys import copy import time import json from timeit import default_timer as timer from filibuster.datatypes import TestExecution, ServerState from filibuster.debuggin...
import os from datetime import datetime import numpy as np from msl.io import JSONWriter, read from .. import __version__ from ..log import log from ..constants import REL_UNC, DELTA_STR, SUFFIX, MU_STR def num_to_eng_format(num): for key, val in SUFFIX.items(): renum = num/val if abs(renum) < 1...
""" GRUD.py utilities for GRU-D on MIMIC-III """ # import dependecies import pandas as pd import numpy as np import os import glob import copy import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as utils from torch.autograd import Variable from torch...
import time import wx import settings #import matplotlib #matplotlib.use( 'WXAgg',warn=False ) #matplotlib.interactive( False ) #from simplehuckel import matplotlib,FigureCanvasWxAgg,Figure,pylab #from matplotlib.figure import Figure #import pylab from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg from ma...
"""models and solvers""" import argparse import os import random from collections import OrderedDict from pathlib import Path import numpy import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset from runx.logx import logx from torch.utils.data import ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 16 15:46:07 2019 @author: """ import logging import os import sys import numpy as np import pickle import csv import datetime as dt import pandas as pd import matplotlib.pylab as plt file_dir = os.path.dirname(__file__) sys.path.append(file_dir)...
import sympy as sp def gen_init_XImats(self, include_base_inertia = False): # add function description if include_base_inertia: self.gen_add_func_doc("Initializes the Xmats and Imats in GPU memory", \ ["Memory order is X[0...N], Ibase, I[0...N]"], \ [],"A pointer to the XI memor...
import datetime import locale import os import matplotlib import matplotlib.dates as mdates import matplotlib.pyplot as plt import numpy as np import pandas as pd from netCDF4 import num2date __author__ = '<NAME>' __email__ = '<EMAIL>' __created__ = datetime.datetime(2017, 2, 24) __modified__ = datetime.datetime(2019,...
# # Copyright (c) 2014 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribu...
# This file is part of colorspacious # Copyright (C) 2015 <NAME> <<EMAIL>> # See file LICENSE.txt for license information. import numpy as np from collections import namedtuple, defaultdict __all__ = ["Edge", "MATCH", "ANY", "TransformGraph"] ################################################################ # Basic ...
#!/usr/bin/python # Copyright 2020 Makani Technologies 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 applicabl...
""" The MIT License Copyright (c) 2014-2015 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
import gym from gym import spaces from gym.utils import seeding import numpy as np from collections import deque import copy import sys MACHINE_PRECISION = 1e-10 secperhr = 60*60 kmpermiles = 1.609344 quantization = 1. # the more this value the more quantization we get T = 1.0/60*secperhr*quantization # seconds per ...
#!/usr/bin/python """ SPDX-License-Identifier: Apache-2.0 Copyright (c) 2019 STMicroelectronics. This script define Stm32SerieUpdate class to be used by update_stm32_package.py """ import os import shutil import subprocess import re from pathlib import Path import logging from jinja2 import Environment, FileSystemLoad...
import builtins import datetime from files_sdk.models.usage_snapshot import UsageSnapshot from files_sdk.api import Api from files_sdk.exceptions import InvalidParameterError, MissingParameterError, NotImplementedError class Site: default_attributes = { 'name': None, # string - Site name 'allow...
# # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
import functools import re from dataclasses import dataclass from typing import Optional, List, Dict, Set, Union, Tuple, Iterable from django.contrib.postgres.fields import ArrayField from django.db import models from django.db.models import PROTECT, CASCADE, QuerySet, Q from django.urls import reverse from lazy impor...
from random import * import numpy as np import time import logging import tkinter as tk from PIL import Image, ImageTk import pygame as pygame #************************************************************************* # Classe Paquet: # Une carte est representé par sa valuer, sa figure et le fichier image # le represa...
import asyncio import logging import random import re import string import time from copy import copy from datetime import datetime, timedelta import discord from discord.errors import HTTPException from typing import Union, List, Tuple, Literal from discord.ext import tasks from redbot.core import Config, commands, ...
#!/usr/bin/env python # Copyright 2018 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. import sys import os import shlex import time import fnmatch import signal import subprocess ...
import logging import pickle from typing import Dict, List, Optional, Set, Union import click import hail as hl from gnomad.resources.grch38.gnomad import ( COHORTS_WITH_POP_STORED_AS_SUBPOP, HGDP_POPS, TGP_POPS, TGP_POP_NAMES, POPS, SEXES, SUBSETS, ) from gnomad.sample_qc.ancestry import ...
"""Script to run pose and shape evaluation for different datasets and methods.""" import argparse import os from datetime import datetime import time from typing import List, Optional, Tuple import random import sys from scipy.spatial.transform import Rotation import numpy as np import matplotlib.pyplot as plt import ...
#-*-coding:Utf-8-*- __author__ ="<NAME>" __version__ = "1.0.1" __license__ = "BSD" import json import re,os,string from utils import Logger,Atom from enum import Enum class SingletonTopo: """ """ OSE_LIST = {} #dictionnaire listant les oses et les substitutions avec comme cl� leur num�ro et l'objet...
#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK from __future__ import division, print_function # viability imports import pyviability as viab from pyviability import helper from pyviability import libviability as lv from pyviability import tsm_style as topo # model imports import examples.AWModel as awm import examp...
#!/usr/bin/env python3 # -*- coding:utf8 -*- import functools import random import sys from PyQt5.QtCore import (QByteArray, QDataStream, QFile, QFileInfo, QIODevice, QPoint, QPointF, QRectF, Qt) from PyQt5.QtWidgets import (QApplication, QDialog, QDialogButtonBox...
#! /usr/bin/env python3 # Author by Xnuvers007 # Support me with follow my instagram page and github page # Disclaimer: please dont re-edit or recode the original source code ! # Last update: 04/09/2021 - version 1.7 from bs4 import BeautifulSoup import os import sys import re import json import requests import textw...
####################### ####################### ####################### ####################### READ ME PLEASE !!!!!!!! ####################### ####################### ####################### ####################### # This code works only in Python 3 # (2.x does not work because of the print function). # This code w...
from Hyperelasticity_Cube import Hyperelastic_Cube """ Set up for simulation using the poroelastic package. """ import uuid import sys from ufl import grad as ufl_grad import sys import numpy as np import dolfin as df import poroelastic as poro from poroelastic.material_models import * import poroelastic.utils as uti...
# -*- coding: utf-8 -*- #Part of: https://github.com/elceef/dnstwist/blob/master/dnstwist.py import re import sys import socket import signal import time import argparse import threading from random import randint from os import path try: import queue except ImportError: import Queue as queue try: imp...
# Copyright (c) 2020 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute,...
import datetime from typing import BinaryIO, Tuple, List from functools import wraps from marshmallow import Schema, INCLUDE from webargs import fields from webargs.flaskparser import use_args from flask import Blueprint, request, jsonify from jsonschema.exceptions import ValidationError from sqlalchemy.orm.session im...
import os import time import requests import sqlalchemy as db from flask import Blueprint, render_template, flash, redirect, url_for, session, request, send_file, make_response from flask import current_app as app, Response from wtforms import Form, StringField, validators, TextAreaField, RadioField if __name__ == '...
""" Interface to the UMFPACK library. -- Author: <NAME> """ from __future__ import division, print_function, absolute_import import re import warnings from scipy.lib.six import iteritems import numpy as np import scipy.sparse as sp try: # Silence import error. from . import _umfpack as _um except: _um = N...
#!/usr/bin/python3.3 # -*- coding: utf-8 -*- """ModuleFinder based on importlib """ # XXX XXX XXX Does not yet support PEP 452 namespace packages! from collections import defaultdict import dis import importlib import importlib.machinery import os import pkgutil import struct import sys import textwrap...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # A tf.keras implementation of mobilenet_v3, # which is ported from https://github.com/keras-team/keras-applications/blob/master/keras_applications/mobilenet_v3.py # # Reference # [Searching for MobileNetV3](https://arxiv.org/abs/1905.02244?context=cs) # """MobileNet ...
from contextlib import contextmanager from collections import defaultdict, namedtuple from copy import copy import warnings from numba.core import (errors, types, typing, ir, funcdesc, rewrites, typeinfer, config, lowering) from numba.parfors.parfor import PreParforPass as _parfor_PreParforPas...
import demistomock as demisto from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import from CommonServerUserPython import * # noqa import re import json import traceback from typing import Tuple, List, Dict, Any, cast import html from functools import reduce ''' CONSTANTS ''' # disable-secre...
import os, shutil, glob import pysam import sys from Bio import SeqIO import os import time import vcf import math from cigar import Cigar import hashlib from shutil import copyfile from datetime import datetime import argparse protein = {"TTT" : "F", "CTT" : "L", "ATT" : "I", "GTT" : "V", "TTC" : "F", "CTC"...
r""" Interface to GNU Octave GNU Octave is a free software (GPL) MATLAB-like program with numerical routines for integrating, solving systems of equations, special functions, and solving (numerically) differential equations. Please see http://octave.org/ for more details. The commands in this section only work if you...
# coding=utf-8 import os import pickle import sys import zlib import base64 from datetime import datetime import metasmoke import requests import json import time import math # noinspection PyCompatibility import regex from parsing import api_parameter_from_link, post_id_from_link from globalvars import GlobalVars imp...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Contains common helpers for GN action()s.""" import collections import contextlib import filecmp import fnma...
from collections import OrderedDict import numpy as np import pytest from pandas._libs.tslib import Timestamp from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike import pandas as pd from pandas import Index, MultiIndex, date_range import pandas.util.testing as tm def test_constructor_singl...
import os import pandas as pd # os.environ["CUDA_VISIBLE_DEVICES"] = "5" import sys from datetime import datetime import torch from torch import save import numpy as np import argparse sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/models') sys.path.append(os.path.dirname(os.path.realpath(__file__)) + ...
import string from itertools import product from collections import defaultdict keycode = defaultdict(dict) keycode['default'][0] = 'unknown' keycode['default'][8] = 'backspace' keycode['default'][9] = 'tab' keycode['default'][13] = 'enter' keycode['default'][16] = 'shift' keycode['default'][17] = 'ctrl' keycode['def...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 <NAME> # Copyright (c) 2008-2020 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
""" IP Routes object abstractions for representing IP routes in VPP """ from vpp_object import VppObject from socket import inet_pton, inet_ntop, AF_INET, AF_INET6 from vpp_ip import DpoProto, VppIpPrefix, INVALID_INDEX, VppIpAddressUnion, \ VppIpMPrefix from ipaddress import ip_address, IPv4Network, IPv6Netw...
# Copyright (c) 2021 MIT # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIM ALL WARRANTIES ...
#!/usr/bin/env python # Yapps 2.0 - yet another python parser system # <NAME>, January 1999 # See http://theory.stanford.edu/~amitp/Yapps/ for documentation and updates # v2.0.1 changes (October 2001): # * The exceptions inherit the standard Exception class (thanks <NAME>) # * The scanner can use either a different s...
""" This module contains the TreeGrower class. TreeGrowee builds a regression tree fitting a Newton-Raphson step, based on the gradients and hessians of the training data. """ from heapq import heappush, heappop import numpy as np from numba import njit, prange from time import time from .splitting import (SplittingC...
from __future__ import print_function, division, absolute_import import GPy import numpy as np import safeoptpp as safeopt import scipy import math import time import os import datetime import pickle import multiprocessing as mp import sys import pathlib store_path = str(pathlib.Path(__file__).parent.resolve()) def ...
""" Collection of core plotting objects, which can be represented in the Javascript layer. The object graph formed by composing the objects in this module can be stored as a backbone.js model graph, and stored in a plot server or serialized into JS for embedding in HTML or an IPython notebook. """ from __future__ impo...
from __future__ import division from __future__ import print_function from __future__ import absolute_import import numpy as np #from gym.wrappers.monitoring import VideoRecorder import gym from dotmap import DotMap import time import sys import re import multiprocessing import os.path as osp import gym from collecti...
from evoplotter import utils from evoplotter import printer from evoplotter import reporting from evoplotter.dims import * import numpy def load_correct_props(folders, name = ""): props0 = utils.load_properties_dirs(folders, exts=[".txt.cdgp"]) all_logs = utils.load_properties_dirs(folders, exts=[".txt.cdgp",...
import os import csv import sys import re import threading import time import tkinter as tk from tkinter import scrolledtext, ttk, messagebox, END from tkinter.filedialog import askdirectory class App(tk.Frame): __OUTFILE_PREFIX = "ParsedFileResults" __OUTFILE_HEADERS = ['FILENAME', 'TRN02', 'TRN03', 'PAYER',...
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # Copyright (C) 2020 <NAME> # Use of this source code is governed by the MIT License ############################################################################### from . im...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import contextlib import inspect import io import sys from .. import TestUnitBase from refinery.lib.frame import Chunk from refinery.lib.loader import load_pipeline as L from refinery import drain @contextlib.contextmanager def errbuf(): sys_stderr = sys.stderr ...
#!/usr/bin/env python # # Copyright (c) 2015 - 2022, Intel Corporation # # 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 retain the above copyright # notice, thi...
#!/usr/bin/env python # Copyright 2015-2021 Yelp 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...
# -*- coding: utf-8 -*- """ Created on Mon Jun 29 14:00:18 2020 updated on Thu Oct 15 18:07:45 2020 @author: <NAME> """ #reproducability from numpy.random import seed seed(1) import tensorflow as tf tf.random.set_seed(1) import numpy as np from bayes_opt import BayesianOptimization from bayes_opt.logger import JSONL...
""" HDF5 Pricing File Format ------------------------ At the top level, the file is keyed by country (to support regional files containing multiple countries). Within each country, there are 4 subgroups: ``/data`` ^^^^^^^^^ Each field (OHLCV) is stored in a dataset as a 2D array, with a row per sid and a column per s...
"""Available Commands Read code in noice.py """ # .cowsay cow which says things.\ # :/Usage: Check yourself # -_- Ok... # ;_; Like `-_-` but crying. # .cp Copypasta the famous meme # .vapor Vaporize everything! # .str Stretch it. # .10iq You retard !! # .zal Invoke the feeling of chaos. # nOof Ooooof # .hii Greet e...
# Copyright 2019 École Polytech<NAME>. 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 applicabl...
""" Msgpack serializer support for reading and writing pandas data structures to disk portions of msgpack_numpy package, by <NAME> were incorporated into this module (and tests_packers.py) License ======= Copyright (c) 2013, <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or wit...
#!/usr/bin/env python """Plots model samples.""" import argparse import numpy as np import random import sys import json import datetime import os import time from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler # from plat.fuel_helper import get_anchor_images, get_anchor_label...
from typing import Set from django.db import connection from django.conf import settings from django.contrib.auth import get_user_model from django.db import models from django.db.models import Count, Q, Sum from django.db.models.expressions import F from django.core.cache import cache from django.db.models.signals ...
from __future__ import division, print_function, absolute_import from .core import SeqletCoordinates from modisco import util import numpy as np from collections import defaultdict, Counter import itertools from sklearn.neighbors.kde import KernelDensity import sys import time from .value_provider import ( Abstract...
""" Please make note ``kolibri.utils.cli`` has a sensitive module import order. This deliberately imports ``kolibri.__init__`` before loading additional ``kolibri.*`` modules. TODO: Investigate and challenge/explain this load order. """ from __future__ import absolute_import from __future__ import print_function fro...
#!/usr/bin/env python3 # t_tensor.py #------------------------------------------------------------------------------------------------# # This software was written in 2016/17 # # by <NAME> <<EMAIL>>/<<EMAIL>> # # and <NAME> <<EMAIL>> ("th...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distribute...
### QMIX algorithm # paper: QMIX: Monotonic Value Function Factorisation for Deep Multi-Agent Reinforcement Learning # reference: https://github.com/AI4Finance-Foundation/ElegantRL/blob/e980158e89cdc3c80be9c0770790a84dc6db8efd/elegantrl/agents/AgentQMix.py from numpy.core.function_base import _logspace_dispatcher fro...
"""DGL PyTorch DataLoaders""" import inspect import torch as th from torch.utils.data import DataLoader from ..dataloader import NodeCollator, EdgeCollator, GraphCollator from ...distributed import DistGraph from ...distributed import DistDataLoader from ...ndarray import NDArray as DGLNDArray from ... import backend a...
# Author: <NAME> # Contact: <EMAIL> """Management of MPI worker processes.""" # pylint: disable=missing-docstring import os import sys import time import atexit import weakref import warnings import itertools import threading import collections from .. import MPI # --- def serialized(function): if serialized...
import arrow from extensions import db class Client(db.Model): '''define the client node''' __primarykey__ = 'company_id' person = db.Label() company_id = db.Property() company_name = db.Property() has_onboard = db.RelatedTo('Onboard') @staticmethod def create(company_id, comp...
# (c) Copyright [2015] Hewlett Packard Enterprise Development LP # # 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 r...
#-*- coding: UTF-8 -*- import sys sys.path.append('../scintilla/scripts') import os.path import re from enum import IntFlag from FileGenerator import Regenerate AllKeywordAttrList = {} # see EditLexer.h class KeywordAttr(IntFlag): Default = 0 NoLexer = 1 MakeLower = 2 NoAutoComp = 4 @staticmethod def get_c_ex...
# python make_gini_table_hesitancy_by_income.py MSA_NAME vaccination_ratio vaccination_time rel_to NUM_GROUPS ACCEPTANCE_SCENARIO # python make_gini_table_hesitancy_by_income.py Atlanta 0.1 31 Baseline 5 real import setproctitle setproctitle.setproctitle("covid-19-vac@chenlin") import sys import os import datetime im...
import glob import os import asset_production_tools as apt import numpy as np import pandas as pd import scipy.interpolate as interp import scipy.ndimage as ndimage import scipy.signal as signal import sunpy.map as smap import sunpy.image.coalignment as coalign import astropy.units as u from astropy.coordinates import ...
#!/usr/bin/env python # coding: utf-8 # Copyright 2020 (c) Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License. # # Example Predictor: Linear Rollout Predictor # # This example contains basic functionality for training and evaluating a linear predictor that rolls out p...
#/usr/bin/python from __future__ import print_function import argparse import torch import pickle import numpy as np import os import math import random import sys import matplotlib.pyplot as plt import seaborn as sns import scipy.io import data from sklearn.decomposition import PCA from torch import nn, opt...
import matplotlib import numpy as np import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec from scipy import polyfit, polyval, stats import pandas as pd # from mytext import textTL, textTR import statsmodels.api as sm from patsy import dmatrices,ModelDesc,Term,LookupFactor from copy import deepcopy i...
# This module contains the model class import logging import os import itertools import numpy as np import pandas as pd from astropy import constants, units as u import scipy.special from util import intensity_black_body from tardis.montecarlo import montecarlo from tardis.montecarlo.base import MontecarloRunner fro...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2012-2018 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
from chord_recognition import MIDIChord import numpy as np import pretty_midi import copy from vocab import RemiVocab, OctupleVocab from constants import ( # vocab keys TIME_SIGNATURE_KEY, BAR_KEY, POSITION_KEY, INSTRUMENT_KEY, PITCH_KEY, VELOCITY_KEY, DURATION_KEY, TEMPO_KEY, CHORD_KEY, NOTE_DE...
import mxnet as mx from mxnet import ndarray as nd from mxnet.gluon import nn from mxnet import gluon import tvm from tvm.contrib import graph_runtime import nnvm from tvm import relay import sym_calib as calib import utils import mrt as _mrt import gluon_zoo as zoo import sym_pass as spass import sym_utils as sutils...
# coding: utf8 from collections import Counter, OrderedDict from itertools import chain import torch from tqdm import tqdm import warnings from .dataset import Dataset from .pipeline import Pipeline from .utils import get_tokenizer, dtype_to_attr, is_tokenizer_serializable from ..vocab import Vocab, SubwordVocab clas...
''' pydevd - a debugging daemon This is the daemon you launch for python remote debugging. Protocol: each command has a format: id\tsequence-num\ttext id: protocol command number sequence-num: each request has a sequence number. Sequence numbers originating at the debugger are odd, sequence numbers ori...
# SUPER CLASSES import pandas as pd # import numpy as np from datetime import datetime as dt import pprint from pathlib import Path from matplotlib import pyplot as plt from jinja2 import Template import altair as alt from ast import literal_eval # use with caution: # https://altair-viz.github.io/user_guide/faq.html#...
# Code inspired by and based partially on https://gitlab.cern.ch/scipp/mario-mapyde from array import array import ROOT from ROOT import TH1F class DelphesEvent: def __init__(self, event, high_lumi=False, **kwargs): self.event = event # Only one event try: weight = event.Event...
# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 # # 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 withou...
# -*- coding: UTF-8 -*- from __future__ import with_statement import unittest import os import tempfile import textwrap from xml.dom import minidom import codecs from six import u, PY2 from junit_xml import TestCase, TestSuite, decode def serialize_and_read(test_suites, to_file=False, prettyprint=False, encoding=No...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 27 23:08:38 2021 @author: zengke """ from sklearn.base import BaseEstimator,TransformerMixin import numpy as np import pandas as pd import warnings import re from BDMLtools.base import Base from BDMLtools.selector.bin_fun import binFreq,binPretty,bi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ clever.py Compute CLEVER score using collected Lipschitz constants Copyright (C) 2017-2018, IBM Corp. Copyright (C) 2017, <NAME> <<EMAIL>> and <NAME> <<EMAIL>> This program is licenced under the Apache 2.0 licence, contained in the LICENCE file in t...
# Authors: <NAME> <<EMAIL>>, <NAME> <<EMAIL>> # # License: BSD 3 clause from __future__ import print_function import chemplot.descriptors as desc import chemplot.parameters as parameters import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import umap import base64 import functo...
from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt, cint, getdate, now #from erpnext.stock.utils import update_included_uom_in_report from erpnext.stock.report.stock_ledger.stock_ledger import get_item_group_condition from six import iteritems import pprint #Copied...
# STANDARD libraries import os import pandas as pd import numpy as np import os from tensorflow.keras.optimizers import Adam import matplotlib as mpl import matplotlib.pyplot as plt plt.style.use('seaborn-bright') font_dict={'family':'"Titillium Web", monospace','size':16} mpl.rc('font',**font_dict) import plotly.graph...