text
stringlengths
8.04k
46.5k
import enum import typing from collections import defaultdict from datetime import date from datetime import datetime as Datetime from datetime import time from datetime import timedelta as Timedelta from datetime import timezone as Timezone from decimal import Decimal from enum import Enum from json import loads from ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright European Organization for Nuclear Research (CERN) since 2012 # # 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.apach...
from templates.modifiers import apply_modifiers_to_grammar from templates.ruar_mods import get_all_modifiers from templates.areyourobot_grammar import ARobotOrHuman, AHuman, ARobot, Lead, Outro, MaybeALead, LeadOrOut, \ add_trailing_space, safeneg_leads from templates.common_rules import Adjective, PluralRobots, Pl...
#!/usr/bin/python3 import copy from gf256 import GF256 class AES: """ AES standard cryptography cipher """ Sbox = [ [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...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2018 "Neo4j," # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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 L...
# Copyright (C) 2019 Red Hat, 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...
# -*- coding: utf-8 -*- """Functions to deal with eBay categories and relevant category options.""" import operator import os import pickle import collections import frappe from frappe import msgprint from .ebay_get_requests import ( get_categories_versions, get_categories, get_features ) from .ebay_constants im...
import logging import math import multiprocessing as mp import os import random from dataclasses import dataclass, field from pathlib import Path from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union, cast import torch from logzero import logger from misspell import make_typo from tensorboardX...
####### RNN DECODER import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): ''' Attention network for calculate attention value ''' def __init__(self, encoder_dim, decoder_dim, attention_dim): ''' :param encoder_dim: input size of encoder network ...
#!/usr/bin/env python3 """ hhbsuite.py Creates HH-suite database files from A3M and HHM files Usage: Usage: python hhsuite_db.py -o <db_name> [-ia3m <a3m_dir>] [-ihhm <hhm_dir>] [-ics <cs_dir>] [more_options] HHsuite version 3.0.0 (15-03-2015) Reference: <NAME>., <NAME>., <NAME>., and <NAME...
#!/usr/bin/env python from manimlib.imports import * import numpy as np class Grid(VGroup): CONFIG = { "height": 6.0, "width": 6.0, } def __init__(self, rows, columns, **kwargs): digest_config(self, kwargs, locals()) super().__init__(**kwargs) x_step = self.width ...
# -*- coding: utf-8 -*- import pandas as pd import os import configparser, ast import copy #Constants kbh="20836612225.1252" # Boltzmann constant divided by Planck constant, s^-1, string. kbev="8.617333262145E-5" # Boltzmann constant in eV·K−1, string. avogadro=6.02214199E23 # Avogadro's constant. ...
# Copyright 2019, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright # (c) 2009-2019, <NAME>, <NAME>, Pivotal Software, Inc and others. # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright ...
import subprocess import signal import json import vim import re import os import sys from itertools import groupby import vimbufsync vimbufsync.check_version("0.1.0",who="merlin") enclosing_types = [] # nothing to see here current_enclosing = -1 atom_bound = re.compile('[a-z_0-9A-Z\'`.]') ######## ERROR MANAGEMENT ...
### # Introspective Autoencoder Main training Function # <NAME>, 2016 import argparse import imp import time import logging # import sys # sys.path.insert(0, 'C:\Users\Andy\Generative-and-Discriminative-Voxel-Modeling') import numpy as np from path import Path import theano import theano.tensor as T import lasagne ...
import copy import math import numpy as np import paddle import paddle.nn as nn import paddle.nn.functional as F from paddlenlp.transformers import PretrainedModel, register_base_model __all__ = [ 'NeZhaModel', "NeZhaPretrainedModel", 'NeZhaForPretraining', 'NeZhaForSequenceClassifica...
#================================LabFuncs.py===================================# # Created by <NAME> 2019 # Description: # Contains an assortment of functions that are all related to the 'Lab' somehow # e.g. the nuclear form factor, lab velocity etc. # Contains: ##### # FormFactorHelm: Only Form factor being used a...
import numpy as np import sys import time from sklearn.model_selection import RepeatedKFold from sklearn.model_selection import GroupKFold from sklearn.base import BaseEstimator from scipy.linalg import cholesky, solve_triangular from sklearn.metrics.pairwise import euclidean_distances from sklearn.decomposition import...
#! /usr/local/bin/python import sys from numpy import * import numpy.linalg as LA from decimal import * from copy import deepcopy from itertools import permutations from ClassesFunctions import * # S.J. 07/09/2018 - changes to use the functions defined in ClassesFunctions file to avoid redundancy vertexOrd...
from __future__ import absolute_import, division, print_function from collections import defaultdict import numpy as np from glue.core import Data from glue.config import colormaps from glue.viewers.matplotlib.state import (MatplotlibDataViewerState, MatplotlibLayerState, ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import argparse import atexit import boto3 import botocore.exceptions import cgi import datetime import elasticsearch import io import json import os import psycopg2 import re import requests # XXX: C4-211 should not be needed but is // KMP needs this, too, until subrequest posts work import signal import structlog im...
from functools import lru_cache import numpy as np from lie_learn.representations.SO3.irrep_bases import change_of_basis_matrix from lie_learn.representations.SO3.pinchon_hoggan.pinchon_hoggan_dense import rot_mat, Jd from lie_learn.representations.SO3.wigner_d import wigner_d_matrix, wigner_D_matrix import lie_lear...
""" problog.forward - Forward compilation and evaluation ---------------------------------------------------- Forward compilation using TP-operator. .. Part of the ProbLog distribution. Copyright 2015 <NAME>, DTAI Research Group Licensed under the Apache License, Version 2.0 (the "License"); you may...
import sublime import sublime_plugin import os import io import errno import timeit import time import ctypes import time import shutil import threading import WhooshSearch.whoosh.analysis from WhooshSearch.whoosh import index from WhooshSearch.whoosh.fields import * from WhooshSearch.whoosh.filedb.fi...
#!/usr/bin/env python # encoding: utf-8 # # bpt.py # # Created by <NAME> on 19 Jan 2017. from __future__ import division from __future__ import print_function from __future__ import absolute_import from packaging.version import parse import warnings import matplotlib import matplotlib.pyplot as plt import numpy as ...
""" """ import copy import logging import numpy as np from tqdm import tqdm from qiskit.circuit import Parameter from qiskit.ignis.mitigation import tensored_meas_cal from qcoptim.cost.crossfidelity import ( CrossFidelity, ) from qcoptim.utilities import ( make_quantum_instance, simplify_rotation_angles,...
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ augmentation.py ] # Synopsis [ Data Augmentation Pipeline ] # Source [ https://github.com/melwch/s3prl/tree/master/s3prl/preprocess/augmentation ] # Autho...
import numpy as np import pandas as pd import os import os.path fold = 4#1#4#3 resep = 143#21#17#39 gbtdepth = 2#3#2#3 neptime = 0.3 testdetp = -2 traindetp = -2 start_epoch = 0 # start from epoch 0 or last checkpoint epoch resmodelpath = './detcls-'+str(fold)+'-old/ckptgbt.t7' def iou(box0, box1): r0 = box0[3] / ...
from datetime import timedelta import functools import numpy as np import pandas as pd from . import common from . import indexing from . import ops from . import utils from .pycompat import basestring, OrderedDict, zip import xray # only for Dataset and DataArray def as_variable(obj, key=None, strict=True): "...
#! /usr/bin/env python3 """ WinCE Decompressor: Decompress compressed files from Windows CE ROMs. """ import argparse import ctypes import io import os class UnsupportedWindowSizeRange(Exception): """ Exception to deal with window sizes out of range. """ def __init__(self): super().__init...
""" Distributed under the terms of the BSD 3-Clause License. The full license is in the file LICENSE, distributed with this software. Author: <NAME> <<EMAIL>> Copyright (C) European X-Ray Free-Electron Laser Facility GmbH. All rights reserved. """ from PyQt5.QtCore import ( QAbstractItemModel, QAbstractListModel,...
"""Quantities of a nuclear isotope, with decay and activation tools.""" import datetime import copy import numpy as np import warnings from .isotope import Isotope from ..core import utils from collections import OrderedDict UCI_TO_BQ = 3.7e4 N_AV = 6.022141e23 class IsotopeQuantityError(Exception): """Raised b...
""" Domain of parameters to generate configs. """ from itertools import product, islice from collections import OrderedDict from copy import copy, deepcopy from pprint import pformat import numpy as np from .utils import must_execute, to_list from .. import Config, Sampler, make_rng from ..named_expr import eval_expr...
import os import sys import csv import json import random import requests from typing import Any, List, Optional from datetime import datetime, timedelta, date from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, Blueprint, jsonify from jinja2 import TemplateNotFound from sq...
import os import inspect import ctypes from collections import Callable, Iterable, OrderedDict, Hashable, Mapping from decorator import decorator from functools import partial, wraps, reduce from itertools import chain, combinations, product, zip_longest from operator import attrgetter, mul from subprocess import DEVNU...
# (C) Copyright 2017 Inova Development 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 appl...
'''articles/views.py''' import django_filters from django.contrib.postgres.fields import ArrayField from django.contrib.sites.shortcuts import get_current_site from django.core.mail import send_mail from django.shortcuts import get_object_or_404 from django.template.loader import render_to_string from django_filters im...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions to calculate frequency spectra.""" import copy import warnings import contextlib import os from stingray.gti import cross_gtis from stingray.crossspectrum import AveragedCrossspectrum from stingray.powerspectrum import AveragedPowerspectrum f...
# -*- encoding: utf-8 -*- """ _core/queries_db/query_utils.py """ import re import random import pandas as pd import numpy as np from pandas.io.json import json_normalize from log_config import log, pformat log.debug("... _core.queries_db.query_doc.py ..." ) from bson.objectid import ObjectId from flask_restpl...
# $Id$ #----------------------------------------------------------------------- # Copyright (C) 2004-2019 # Associated Universities, Inc. Washington DC, USA. # # 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 So...
import numpy as np from scipy.spatial import distance from scipy.sparse import csgraph from matplotlib import pyplot from matplotlib.widgets import Slider, Button, RadioButtons import linear_utilities as lu def rkm(X, init_W, s, plot_ax=None): """ Regularized K-means for principal path, MINIMIZER. Arg...
import torch import torch.nn as nn from torch.autograd import Variable import numpy as np import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F from torch.optim import lr_scheduler import numpy as np import contextlib import math from medseg.models.segmentation_models....
#!/usr/bin/env python # A logFileParser class to parse VistA FileMan Schema log files and generate # the FileMan Schema and dependencies among packages. #--------------------------------------------------------------------------- # Copyright 2012 The Open Source Electronic Health Record Agent # # Licensed under the Ap...
#!/bin/env python # # File: RDKitFilterPAINS.py # Author: <NAME> <<EMAIL>> # # Copyright (C) 2020 <NAME>. All rights reserved. # # The functionality available in this script is implemented using RDKit, an # open source toolkit for cheminformatics developed by <NAME>. # # This file is part of MayaChemTools. # # MayaChem...
"""This module contains unit tests for :mod:`~prody.select`.""" import os import os.path import inspect import numpy as np from numpy.testing import * from prody import * from prody import LOGGER from prody.tests import unittest from prody.tests.datafiles import * from prody.atomic.atommap import DUMMY try: rang...
from __future__ import unicode_literals import base64 import uuid from datetime import timedelta import logging from django.db import models # from django.db.models import Q from django.contrib.auth import get_user_model from django.core import urlresolvers, signing from django.core.exceptions import ValidationError ...
# -*- coding: utf-8 -*- """ Defines various renderers for the game of nonogram """ from __future__ import unicode_literals, print_function, division from itertools import combinations try: from abc import ABC except ImportError: from abc import ABCMeta # https://stackoverflow.com/a/38668373 ABC = AB...
from ..free_module import FreeModuleElement from ..symmetric import SymmetricGroupElement from ..symmetric import SymmetricRingElement, SymmetricRing from ..surjection import SurjectionElement from ..utils import partitions, pairwise from itertools import product, combinations from math import floor, factorial clas...
import argparse import time import os import glob import sys import json import shutil import itertools import numpy as np import pandas as pd import csv import torch from torch.autograd import Variable from sklearn.metrics import confusion_matrix from torch.nn import functional as F from opts import parse_opts_onli...
from unittest import TestCase import mock from mock import Mock from octodns.provider.plan import Plan from octodns.record import Record, Create, Delete, Update from octodns.zone import Zone from octodns_lexicon import \ LexiconProvider, OnTheFlyLexiconConfigSource, RecordUpdateError, \ RecordCreateError, Re...
# -*- coding: utf-8 -*- #!/usr/bin/env python # # 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 agree...
# -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations ######################################################################### ## This is a sample controller ## - index is the default action of any application ## - user is required for authentication and authorization...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import dateparser import requests from requests import Response from typing import Dict, Any, Union, Tuple from requests.exceptions import MissingSchema, InvalidSchema, InvalidURL, SSLError from concurr...
# Generate Delphi wrapper for HDF5 library. # by <NAME> from __future__ import print_function import sys import os.path import argparse import networkx as nx import datetime import re from collections import * from itertools import * parser = argparse.ArgumentParser(description = 'Generate Delphi wrapp...
import pandas as pd import numpy as np import glob from neuropixels import generalephys_mua as ephys_mua from neuropixels.generalephys import get_waveform_duration,get_waveform_PTratio,get_waveform_repolarizationslope,option234_positions from scipy.cluster.vq import kmeans2 import seaborn as sns;sns.set_style("ticks") ...
from __future__ import print_function, division from glob import glob import matplotlib.pyplot as plt import numpy as np import os import TA_functions as taf ''' This script crates the plots in DeltaV2-DeltaV3 space, that compare the 3 tests ran. TEST1 - Average positions P1 and P2, transform to V2-V3 space, an...
import torch from config import config as cfg import backbones import logging import losses import os import torch import torch.distributed as dist import torch.nn.functional as F import torch.nn as nn import torch.utils.data.distributed from utils.utils_logging import AverageMeter, init_logging from utils.utils_callba...
# Copyright 2018 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. """Build indexing and search.""" import heapq import logging import random import re from google.appengine.ext import db from google.appengine.ext import n...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Create the TODO list which is used by the pipeline to keep track of the targets that needs to be processed. """ import os import numpy as np import logging import sqlite3 import h5py import re import itertools import functools import contextlib import multiprocessing f...
"""Make BIDS compatible directory structures and infer meta data from MNE.""" # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: BSD (3-clause) import os import errno import shutil as sh im...
""" This module defines the Manager class. """ import atexit from collections import deque from heapq import heappop, heappush from inspect import isfunction from itertools import chain, count from multiprocessing import Process, current_process from operator import attrgetter from os import getpid, kill from signal im...
# EFILTER Forensic Query Language # # 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 # # Un...
import datetime from bson import ObjectId import random import copy import re import ast import time from dateutil import tz import pymongo from utils.sendReportEmail import send_report_email from tzlocal import get_localzone import string def get_offset_between_local_and_utc(): ts = time.time() utc_offset = ...
import bpy import bpy_extras import bmesh import mathutils import math #import copy bl_info = { "name": "Viewport Vertex Alignment", "author": "Hades", "version": (0, 2), "blender": (2, 6, 9), "location": "View3D > Mesh Edit > Toolshelf > Vertex Alignment", "description": "Ali...
import hashlib from colorama import Fore, Style from Crypto.Cipher import AES from elftools.elf.elffile import ELFFile from .compression import lz77_decompress, lzma_compress from .exception import ( InvalidStockRomError, MissingSymbolError, NotEnoughSpaceError, ParsingError, ) from .patch import Firm...
# Copyright 2019 <NAME> # # This file is part of RfPy. # # 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, m...
""" Given a sorted array `nums`, remove the duplicates from the array. Example 1: Given nums = [0, 1, 2, 3, 3, 3, 4] Your function should return [0, 1, 2, 3, 4] Example 2: Given nums = [0, 1, 1, 2, 2, 2, 3, 4, 4, 5] Your function should return [0, 1, 2, 3, 4, 5]. *Note: For your first-pass, an out-of-place solut...
import streamlit as st # To make things easier later, we're also importing numpy and pandas for # working with sample data. import numpy as np import pandas as pd from scipy.integrate import * import scipy.optimize import matplotlib.pyplot as plt from functools import partial import os, sys st.sidebar.markdown("## Par...
# coding:utf-8 import os import gym import random import numpy as np import tensorflow as tf from collections import deque from skimage.color import rgb2gray from skimage.transform import resize from keras.models import Model from keras.layers import Conv2D, Flatten, Dense, Input, Lambda, concatenate from keras import...
import os # auxiliary library to unpack operation parameters from . import unpack_params as unpack # project configuration wrapper: yaml formatted file from misc.config import settings as conf # cassandra managing helper functions import admix # pyspark modules from pyspark import SparkConf from pyspark.sql import ...
"""Implement a client-side http API to a QAI server for chemical stocks.""" import typing import json import logging from random import Random import time import requests import serverlib.timelib as timelib logger = logging.getLogger('qai_helper') StatusCode = int RequestValue = typing.Tuple[StatusCode, typing.A...
import unittest import numpy as np import numpy.testing as npt from scipy.linalg import toeplitz from doatools.model.array_elements import CustomNonisotropicSensor from doatools.model.perturbations import LocationErrors, GainErrors, \ PhaseErrors, MutualCoupling from doatools.mo...
# grid functions module version = '29th April 2021' # Nexus is a registered trademark of the Halliburton Company import logging log = logging.getLogger(__name__) log.debug('grid_functions.py version %s', version) # defs: # def infill_block_geometry(extent, depth, thickness, x, y, # k_increase_direction = 'down'...
import time import string import math import random import csv from functools import reduce from openpyxl import load_workbook import pandas as pd import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import seaborn as sns import itertools import selenium from selenium impor...
""" Written <NAME>, UC Berkeley, NSDS Lab Function intended to ensure intended functionality of ReachSplitter reference: how to make unit tests: https://www.jetbrains.com/help/pycharm/testing-your-first-python-application.html#write-test Edited 6/4/2021 """ from unittest import TestCase import random import skl...
# This file is part of GridCal. # # GridCal 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 3 of the License, or # (at your option) any later version. # # GridCal is distributed in the hope that...
import rpm # from python3-rpm import os import hashlib import stat import struct from xml.sax import saxutils from operator import itemgetter _share_data_store = {} def share_data(value): """ Take a value and use the same value from the store, if the value isn't in the store this one becomes the shared...
################################################################################# # Deep Visual-Semantic Quantization for Efficient Image Retrieval # # Authors: <NAME>, <NAME>, <NAME>, <NAME> # # Contact: <EMAIL> # ####################...
# Funzioni import operator # Moduli from django.shortcuts import render_to_response from django.core.context_processors import csrf from django.template import RequestContext from django.contrib.auth.models import User from django.http import HttpResponse # Database from ftft.canzoni.models import canzone, licenze fr...
#!/usr/bin/env python import argparse import logging import math import sys import time import random import os import json import numpy as np import pickle import six import threading import pdb from tqdm import tqdm import torch import torch.nn as nn from pytorch_pretrained_bert import BertTokenizer, OpenAIGPTTok...
import os import shutil from functools import partial import neptune import numpy as np import pandas as pd from attrdict import AttrDict from steppy.adapter import Adapter, E from steppy.base import IdentityOperation, Step from common_blocks import augmentation as aug from common_blocks import metrics from common_bl...
""" Apply input bisection for Neural Network verification / certification / falsification. """ import logging import sys from pathlib import Path from typing import Tuple, Optional, Union from timeit import default_timer as timer import torch from torch import Tensor, nn, autograd from torch.utils.data import DataLoa...
# -*- coding: utf-8 -*- """ Created on Thu Dec 9 18:47:27 2021 @author: vwork """ # MODULE --------------------------------------------------------------------- ## GRAPHIQUE import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots ## View import streamlit as st import...
import os, asyncio, time, json, sys from kivy.config import Config Config.read("Media.ini") import random random.seed(int(time.time()*1000)) import cffi, kivy, math, traceback from kivy.app import App from kivy.clock import Clock from kivy.core.image import Image as CoreImage from kivy.core.window import Window from ...
''' train_fns.py Functions for the main loop of training different conditional image models ''' import torch import torch.nn as nn import torchvision import os import utils import losses # Dummy training function for debugging def dummy_training_function(): def train(x, y): return {} return train def GAN_t...
import math import logging from nltk.stem.porter import * import numpy as np import os import copy import keyphrase.dataset.keyphrase_test_dataset as test_dataset from dataset import dataset_utils logger = logging.getLogger(__name__) def evaluate_multiple(config, test_set, inputs, outputs, ori...
############################################################################# # Import # ############################################################################# import os import random import PIL.Image as Image from tqdm import tqdm import numpy ...
# Copyright (c) 2017-2019, <NAME> # Copyright (c) 2014-2018, iocage # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted providing that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # noti...
# 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 th...
# -*- coding: utf-8 -*- """ Released on April 29, 2019 @author: <NAME> <<EMAIL>>; <NAME> <<EMAIL>> The code is part of BMSS software. Copyright (c) 2019, National University of Singapore. This module is to print the Gene circuit using the modified code from quickplot.py in DNAplotlib library Reference: https://git...
from manim import * class ManimCELogo(Scene): def construct(self): self.camera.background_color = "#ece6e2" logo_green = "#87c2a5" logo_blue = "#525893" logo_red = "#e07a5f" logo_black = "#343434" ds_m = MathTex(r"\mathbb{M}", fill_color=logo_black).scale(7) ...
"""Machine learning utilities.""" from collections import Counter, defaultdict from datetime import datetime import importlib import pathlib import warnings import numpy as np import pytorch_lightning as pl import torch import tqdm from mltype.utils import get_cache_dir, get_mlflow_artifacts_path, print_section warn...
import doctest import insights.parsers.octavia as octavia_module from insights.parsers.octavia import OctaviaConf, VALID_KEYS from insights.tests import context_wrap CONF_FILE = """ [DEFAULT] # Print debugging output (set logging level to DEBUG instead of default WARNING level). debug = False # Plugin options are hot...
import numpy as np import pandas as pd import torch,time,os,pickle,random from torch import nn as nn from nnLayer import * from metrics import * from collections import Counter,Iterable from sklearn.model_selection import StratifiedKFold,KFold from torch.backends import cudnn from tqdm import tqdm from Others import * ...
import logging import mlflow import numpy as np import GPyOpt import GPy #from numpy.random import seed from GPyOpt.models.gpmodel import GPModel from GPyOpt.acquisitions import AcquisitionLCB import networkx as nx import collections from myBOModular import MyBOModular from myGPModel import MyGPModel from GPyOpt.core...
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Colony Framework # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Colony Framework. # # Hive Colony Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apach...
#!/usr/bin/env python3 __version__ = 'v1.0.2' try: import sys import signal from colorama import Fore, Style import atexit import argparse import random import time import hashlib import json import re import requests import urllib3 from bs4 import BeautifulSoup ...
""" Train VFL on ModelNet-10 dataset """ import torch import torch.nn as nn import torch.backends.cudnn as cudnn from torch.utils.data import DataLoader from torch.autograd import Variable import torchvision import torchvision.transforms as transforms import argparse import numpy as np import time import os import c...