text
stringlengths
6.04k
39.5k
import json import os import time import rabbitpy from channelpy.exceptions import ChannelTimeoutException from codes import BUSY, ERROR, SPAWNER_SETUP, PULLING_IMAGE, CREATING_CONTAINER, UPDATING_STORE, READY, \ REQUESTED, SHUTDOWN_REQUESTED, SHUTTING_DOWN from config import Config from docker_utils import Dock...
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. import inspect import textwrap from pyiron.base.job.generic import GenericJob """ The GenericMaster is the template cla...
# coding: utf-8 import binascii import curses import os import six import struct import csv import unicodedata from itertools import count from normality import normalize from cronos.constants import KOD, PK_SENTINEL, RECORD_SEP, ENC, NULL class CronosException(Exception): """General parsing errors.""" def vwo...
import os import percy import pytest class BaseTestPercyEnvironment(object): def setup_method(self, method): self.original_env = {} self.original_env['TRAVIS_BUILD_ID'] = os.getenv('TRAVIS_BUILD_ID', None) self.original_env['TRAVIS_BUILD_NUMBER'] = os.getenv('TRAVIS_BUILD_NUMBER', None) ...
import glob import json import logging import os import re import sys from datetime import datetime, timezone from os.path import basename as pbase from os.path import join as pjoin from os.path import splitext as psplit import pytz import requests from discord_webhook import DiscordEmbed, DiscordWebhook """ A tools ...
""" Segmentaion Part Modified from DETR (https://github.com/facebookresearch/detr) """ from collections import defaultdict from typing import List, Optional import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor from PIL import Image from einops import rearrange, repeat try: ...
#!/usr/bin/env python3 # # Runs all unit tests included in Pints. # # This file is part of PINTS. # Copyright (c) 2017-2018, University of Oxford. # For licensing information, see the LICENSE file distributed with the PINTS # software package. # from __future__ import absolute_import, division from __future__ import...
import numpy as np import scipy.sparse as sp from sklearn.utils.fixes import loguniform from sklearn.utils.validation import check_random_state import pytest from cca_zoo.data import generate_covariance_data from cca_zoo.model_selection import GridSearchCV, RandomizedSearchCV from cca_zoo.models import ( rCCA, ...
from pioneer.common import clouds, linalg from pioneer.common.gui import Array, Product, Transforms, Geometry, Image from pioneer.das.api import categories, platform, sensors try: from pioneer.das.calibration import intrinsics except: pass from datetime import datetime from matplotlib import colors from PyQt5.QtCo...
#!/usr/bin/env python3 """ FILE: run_ship_to_shore_transfer.py DESCRIPTION: Gearman worker that handles the transfer of data from the Shipboard Data Warehouse to a Shoreside Data Warehouse. BUGS: NOTES: AUTHOR: <NAME> VERSION: 2.6 CREATED: 2015-01-01 REVISION: 2021-02-13 """ import argpar...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import import pytest # Allow everything in there to access the DB pytestmark = pytest.mark.django_db from django.db import IntegrityError from django.db.models import ProtectedError from django.core.exceptions import Valid...
# Watch out for this one! We're not using typical Python 2 floor division in # this file, but rather floating point division. from __future__ import division from math import ceil from google.appengine.api import namespace_manager from google.appengine.api import users as app_engine_users from google.appengine.ext imp...
""" MIT License Copyright (c) 2019-2020 mathsman5133 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, publ...
import random import math from .config import Config from . import genome # Temporary workaround - default settings #node_gene_type = genome.NodeGene conn_gene_type = genome.ConnectionGene class Chromosome(object): """ A chromosome for general recurrent neural networks. """ _id = 0 def __init__(self, pare...
from turtle import color import numpy as numpy from mpl_toolkits.mplot3d import Axes3D import matplotlib as matplotlib import matplotlib.pyplot as pyplot from matplotlib import gridspec from algorithm.peeling import peeling_to_structure from algorithm.fuzzy import samples_to_fuzzy_projection FONTSIZE = 22 FIGSIZE = ...
import argparse, cv2, time, os, subprocess, json from argparse import RawTextHelpFormatter from prettytable import PrettyTable import numpy as np import matplotlib.pyplot as plt def separator(): print('-----------------------------------------------------------------------------------------------------------') sep...
import argparse import copy import numpy as np import os import re import time import sys import torch from data_iterator import dataIterator, dataIterator_test from encoder_decoder import Encoder_Decoder # Note: # here model means Encoder_Decoder --> WAP_model # x means a sample not a batch(or batch_size = 1)...
import os import numpy as np from moviepy.editor import VideoFileClip from ImageSequenceClip import ImageSequenceClip import utils from timeit import default_timer as timer from SrtTextHandler import SrtTextHandler from DatEmotionHandler import DatEmotionHandler from collections import defaultdict from scipy.io import...
""" The MIT License (MIT) Copyright (c) 2015 <NAME> (AKA Gato) 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...
#!/usr/bin/env python # hbi_load_firmware.py -- Python 2.7 script to manage Timberwolf firmwares and configurations # Copyright 2018 Microsemi Inc. All rights reserved. #Licensed under the MIT License. See LICENSE.txt in the project root for license information. # Functions designed for programmatic interface: # I...
# import base libraries and dependencies from re import UNICODE from numpy.lib import utils import pandas as pd import numpy as np import os import matplotlib.pyplot as plt import seaborn as sns import funcs import eda_plots import utils import models # import machine learning modules from sklearn.model_selection impo...
# Copyright (c) 2017 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from librosa.util import pad_center, tiny from scipy.io.wavfile import write from scipy.signal import get_window from torch import Tensor from torch.autograd import Variable from typing import Optional, Tuple import librosa import librosa.util as librosa_util import math import numpy as np import scipy import torch im...
#-*-coding:utf-8-*- import torch from collections import Counter import numpy as np import argparse import pickle import os import time from torchvision import transforms from model import EncoderClothing, DecoderClothing from darknet import Darknet from PIL import Image from util import * import cv2 import pickle a...
""" Tasks for managing tasks, targets and scanners in GVM. """ import configparser import logging import uuid from fps.client import GMPClient from fps.utils import (export_results, get_hosts, get_key_by_value, reset_discovery_attribute, update_discovered_hosts, update_hos...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import inspect from typing import Any, List, Optional, Tuple, Dict, Iterator, Iterable, cast import torch.nn as nn from nni.common.serializer import is_traceable, is_wrapped_with_trace from nni.retiarii.graph import Cell, Graph, Model, ModelSta...
# The batman package: fast computation of exoplanet transit light curves # Copyright (C) 2015 <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 Software Foundation, either version 3 of the License, or # (a...
# coding: utf-8 # In[14]: import sqlite3 import pandas as pd import numpy as np from time import time import warnings warnings.simplefilter("ignore") # In[15]: database = 'database.sqlite' conn = sqlite3.connect(database) # In[16]: player_data = pd.read_sql("SELECT * FROM Player;", conn) player_stats_data = pd...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function __date__ = "2017-12-10" __author__ = "<NAME>" __email__ = "<EMAIL>" import pandas as pd import numpy as np import matplotlib.pyplot as plt import random """ Returns the distance from point (x,y) to the line in slope-intercept...
""" Script goal, to produce trends in netcdf files This script can also be used in P03 if required """ #============================================================================== __title__ = "Global Vegetation Trends" __author__ = "<NAME>" __version__ = "v1.0(28.03.2019)" __email__ = "<EMAIL>" #=================...
import argparse import json import os import pickle import warnings from itertools import chain import joblib import numpy as np import pandas as pd from galaxy_ml.model_validations import train_test_split from galaxy_ml.utils import (get_module, get_scoring, load_model, read_columns, Safe...
""" Miss Manners seating problem in cpmpy. From http://4c110.ucc.ie/cpstandards/index.php/en/standards/java/examples/27 ''' The 'Miss Manners' problem is a notorious benchmark for rule engines. The problem is to find an acceptable seating arrangement for guests at a dinner party. It should match people with the sam...
import numpy as np import cv2 EDGES = [ [16, 14], [14, 12], [17, 15], [15, 13], [12, 13], [6, 12], [7, 13], [6, 7], [6, 8], [7, 9], [8, 10], [9, 11], [2, 3], [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7] ] EC = [ (255, 0...
from __future__ import print_function import copy import torch.utils.data from IPython.core.debugger import Pdb; from railrl.data_management.images import normalize_image debug = Pdb().set_trace # Adapted from pytorch examples import torch import torch.utils.data from torch import nn, optim from torch.autograd impor...
# import the necessary packages from imutils.video import VideoStream import argparse import numpy as np, cv2 import imutils, time # import the necessary packages from scipy.spatial import distance as dist from collections import OrderedDict import numpy as np class CentroidTracker(): def __init__(self, maxDisap...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # # <NAME> 07/24/21 import os import sys import numpy as np import time import pickle from queue import deque import to...
# STRONGHOLD # @author <NAME> # Built-in modules import sys import subprocess as sp from time import sleep # 3rd party modules import click import inquirer from colorama import Fore, Style # Local modules from constants import Constants def prompt_yes_no(top_line="", bottom_line=""): """Print question and return ...
#! /usr/bin/env python3 import sys import traceback def error(msg=None): if msg is None: sys.stdout.write(traceback.format_exc()) else: sys.stdout.write('error: '+msg+'\n') #end if sys.exit(1) #end def error # label descriptions # # main classification # stable - test is ex...
#!/usr/bin/env python3 # Watching for repositories on GitHub # Written in 2016-2017 by <NAME> # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or distribute # this software, either in source code form or as a compiled binary, for ...
"""Library for the conversion from NEMO output to XGCM data sets.""" import numpy as np import xarray as xr from . import orca_names def trim_and_squeeze(ds, model_config="GLOBAL", y_slice=None, x_slice=None, **kwargs): """Remove redundant grid poin...
# -*- coding: utf-8 -*- # (c) Copyright IBM Corp. 2010, 2018. All Rights Reserved. """Circuits component for Action Module subscription and message handling""" import logging import threading from collections import namedtuple import inspect as _inspect from functools import wraps from types import GeneratorType from...
import os import numpy as np # from . import _api, cbook, colors, ticker import matplotlib from matplotlib.lines import Line2D from matplotlib.patches import Rectangle from matplotlib.text import Text from matplotlib.widgets import AxesWidget from matplotlib.backends.qt_compat import QtGui import matplotlib.pyplot as...
# -*- coding: utf-8 -*- import os import sys import gtk import cairo import pango import pangocairo from .. drawing.dispatcher import DrawMixin from .. gui.plagram_dlg import PgMixin from .. drawing.datasheets import labels from math import pi as PI from .. utils import parsestrtime from .. boss import boss curr = boss...
"""Dimensional-splitting finite-volume scheme for parallelization The functions in this module allow to solve the modified Cahn-Hilliard equation for the image-inpainting filter Author: <NAME> """ import numpy as np from scipy import optimize #########################################################################...
# # The MIT License # # Copyright 2016 Vector Software, East Greenwich, Rhode Island USA # # 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 limita...
"""Contains a Graph Attention Network v2 and associated layers.""" from typing import Any, Callable, Optional, Tuple, Union import tensorflow as tf from tensorflow_gnn.graph import graph_constants as const from tensorflow_gnn.graph import graph_tensor as gt from tensorflow_gnn.graph import graph_tensor_ops as ops from...
#!/usr/bin/env python # # This code calculates LQR gains for a drone system whose reference signal is obtained # by differential flatness. The input to the system is the body frame thrust and body # frame angular velocities, and output is the world frame position, velocity and # angular position given by euler angles....
# -*- coding: utf-8 -*- """ Truncate a matrix with mpo in a truncate number. Date: 2020.11.16 @author: Gaozefeng ACL 2021 version Date: 2021.05.27 @author: <NAME> """ import numpy as np import random import torch.nn as nn import torch import IPython import time seed = 1234 random.seed(seed) np.random.seed(seed) clas...
# -*- coding: utf-8; -*- # # @file models.py # @brief coll-gate application models. # @author <NAME> (INRA UMR1095) # @date 2016-09-01 # @copyright Copyright (c) 2016 INRA/CIRAD # @license MIT (see LICENSE file) # @details import logging import re import uuid as uuid from django.contrib.auth.models import User from ...
import pandas as pd from tqdm import tqdm import numpy as np import matplotlib.pyplot as plt import time import numpy as np import os from transformers import pipeline import dataframe_image as dfi import seaborn as sns import emoji from nltk.corpus import stopwords import re from wordcloud import WordCloud, STOPWORDS,...
# -*- encoding: utf-8 -*- # Copyright (c) 2020 Modist Team <<EMAIL>> # ISC License <https://opensource.org/licenses/isc> """Contains unit-tests for System context features.""" import os from pathlib import Path, WindowsPath from tempfile import TemporaryDirectory from typing import List from unittest.mock import patc...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Read in Mechanical Turk results files to calculate demographic information for various funding and regulatory agencies. Outputs an xlsx file with columns of interest that is easy to do pivot tables for getting the necessary counts """ import argparse from datetime imp...
from torch.utils.data.dataloader import default_collate """ Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import os import logging import pathlib import random import shutil import time import...
import os from random import randrange, choice from discord.utils import get from discord.ext import commands from dotenv import load_dotenv load_dotenv() TOKEN = os.getenv('DISCORD_TOKEN') GUILD = os.getenv('DISCORD_GUILD') description = "i'm bored as shit" inLobby = False inGame = False isReverse = False toDraw = ...
#!/usr/bin/python -W all """ findRoute.py: find longest route with an index of the available train rides usage: findRoute.py [-b beam-size] [-f firstStation] [-h] [-H history-file] [-i] [-n] [-s time] [-S] < traintrips.txt note: expected input line formats: 1. hash sign distance start-station end-station ...
from typing import List, Optional, Callable import numpy as np import torch import torch.nn as nn import pytorch_lightning as pl from pytorch_lightning.loggers import WandbLogger from pytorch_lightning.utilities import rank_zero_only import hydra from omegaconf import OmegaConf, DictConfig import src.utils as utils im...
# SPDX-License-Identifier: GPL-2.0 # intel-pt-events.py: Print Intel PT Events including Power Events and PTWRITE # Copyright (c) 2017-2021, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as ...
import asyncio import difflib import os import random import re import string import unicodedata import urllib from rich import print as rprint import discord import gtts import humanize from better_profanity import profanity from discord.ext import commands from discord.ext.commands import BucketType import uwuify fr...
#!/usr/bin/python # -*- coding: utf-8 -*- # scinoephile.__init__.py # # Copyright (C) 2017-2019 <NAME> # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. ################################### MODULES ##################...
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT """ Generic/abstract event classes. """ import copy from datetime import datetime, timezone from logging import getLogger from typing import Dict, Iterable, Optional, Type, Union, Set, List from ogr.abstract import GitProject from packit.c...
# Lint as: python2, python3 # Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law ...
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from pants.backend.native.config.environment import (Assembler, CCompiler, CppCompiler, ...
from smbus2 import SMBus import time # ADS1x15 default i2c address I2C_address = 0x48 # General ADS1x15 family ADC class class ADS1x15: # ADS1x15 register address CONVERSION_REG = 0x00 CONFIG_REG = 0x01 LO_THRESH_REG = 0x02 HI_THRESH_REG = 0x03 # Input multiplexer configuration ...
from collections import namedtuple from nose.tools import assert_equals import shutil import tempfile from numpy import array, allclose from test_utils import PySparkTestCase from thunder.rdds.series import Series from thunder.rdds.keys import _subToIndConverter, _indToSubConverter class SeriesKeysTestCase(PySparkTes...
# pylint: disable=C0103, C0303 from __future__ import absolute_import import numpy as np import pandas as pd from pandas import DataFrame from lxml import objectify from fitparse import FitFile try: from . import tcxtools,gpxtools from .utils import totimestamp, geo_distance except (ValueError,ImportError): # p...
import os import pygame import pygame.gfxdraw import time import pathlib, os #variables de sinonimia -------------------->> true = True false = False none = None null = None #protocolo de pygame -------------------->> pygame.init() #protocolo de inicializacion para pygame os.environ['SDL_VIDEO_CENTERED'] = '1' #hace...
################################################################ # Module Summary # # - Code generation for each command in kestrel.lark # - The execution function names match commands in kestrel.lark # - Each command takes 2 arguments # ( statement, session ) # - statement is the current ...
# language-learning/src/grammar_learner/clustering.py 80925 import numpy as np import pandas as pd from sklearn.cluster import KMeans from sklearn.metrics import pairwise_distances, silhouette_score from statistics import mode from random import randint from operator import itemgetter from .utl import...
from copy import copy 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, 0x9C, 0xA4, 0x72, 0xC0, 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0...
# keras accuracy and loss functions # https://stackoverflow.com/questions/45632549/keras-accuracy-for-my-model-always-0-when-training import pandas as pd from collections import deque import random import numpy as np import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers imp...
import pandas as pd import sys import glob import os import re import numpy as np import logging logging.basicConfig(stream=sys.stdout, level=logging.INFO, format='[%(asctime)s] %(message)s', datefmt='%Y/%m/%d %H:%M:%S') #inside pathx (MD) def time_freq_fi...
#-*- CODING = UTF-8 -*- #@TIME :2020/12/19 12:11 #@AUTHOR : 王乐之 #@FILE : elgamal.py #@SOFTWARE : PyCharm import random import math import easygui as box1 import sys class PrivateKey(object): #保存私钥的类 def __init__(self, p=None, g=None, x=None, iNumBits=0): self.p = p self.g = g self.x =...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : 河北雪域网络科技有限公司 A.Star # @contact: <EMAIL> # @site: www.snowland.ltd # @file: ZUC.py # @time: 2018/10/20 17:23 # @Software: PyCharm from math import ceil S0 = [ 0x3E, 0x72, 0x5B, 0x47, 0xCA, 0xE0, 0x00, 0x33, 0x04, 0xD1, 0x54, 0x98, 0x09, 0xB9, 0x6D, 0xCB, ...
#coding = utf-8 import json class MatchDto: def __init__(self, jsonData): #self.jsonData = jsonData # self.seasonId = jsonData["seasonId"] if "seasonId" in jsonData else None self.queueId = jsonData["queueId"] if "queueId" in jsonData else None self.gameId = jsonData["gameId"] if "g...
#https://www.kaggle.com/niteshx2/top-50-beginners-stacking-lgb-xgb #https://www.kaggle.com/kernels/scriptcontent/11907006/download import numpy as np # linear algebra import pandas as pd # from datetime import datetime from scipy.stats import skew # for some statistics from scipy.special import boxcox1p from scipy...
#!/usr/bin/python # -*- coding: utf-8 -*- import warnings from pathlib import Path import torch from torch.nn import CrossEntropyLoss from torch.utils.data import (DataLoader, RandomSampler, SequentialSampler, TensorDataset) from transformers import (AlbertTokenizer, BartTokenizer, BertT...
from concurrent.futures.thread import ThreadPoolExecutor import functools import os import sys import time import pytest import requests import ray from ray._private.test_utils import SignalActor, wait_for_condition from ray import serve from ray.serve.api import deploy_group class TestGetDeployment: def get_d...
# Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This uses the i2c-pseudo driver to implement a local Linux I2C adapter of a Servo/DUT I2C bus. """ import collections import errno import logging imp...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # """RAMSES RF - a RAMSES-II protocol decoder & analyser. Schema processor. """ # TODO: move max_zones into system-specific location, ?profile import logging import re from types import SimpleNamespace from typing import Any import voluptuous as vol from .const import...
import os from typing import Dict, List, Tuple import numpy as np import tensorflow as tf from model.conll_dataset import CoNLLDataset from .data_utils import get_chunks, pad_words, pad_chars from .general_utils import Progbar class NERModel: """Specialized class of Model for NER""" def __init__(self, conf...
""" Run the autosync algorithm: 1. Download the original YouTube and podcast audio files, if necessary 2. Slice audio files to isolate their beginnings and endings, if necessary 3. Fingerprint the YouTube audio slices, if necessary 4. Find timestamps by matching the podcast audio slices to fingerprints 5. Wri...
# Modified the provided preprocessing code # @author <NAME> # Original license # Copyright 2020 (c) Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License. import os # noinspection PyPep8Naming import numpy as np import pandas as pd import tensorflow as tf from .xpriz...
# -*- coding: utf-8 -*- # Base class for grating stimulus. # # Copyright (C) 2010-2011 <NAME> # # See LICENSE.TXT that came with this file. from __future__ import division import numpy as np np.seterr(all='raise') import random import logging from VisionEgg.Gratings import SinGrating2D from VisionEgg.Textures import ...
from __future__ import absolute_import, unicode_literals import os import shutil import tempfile from os import path import json from multiprocessing.managers import BaseManager import logging import docker from checksumdir import dirhash from django.core.exceptions import ObjectDoesNotExist from django.conf import s...
""" Copyright 2018 Novartis Institutes for BioMedical Research 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 agr...
#! /usr/bin/env python from __future__ import division from __future__ import print_function from __future__ import absolute_import from builtins import range from past.utils import old_div import argparse from LLC_Membranes.analysis import Atom_props, Diffusivity, Poly_fit from LLC_Membranes.llclib import physical i...
#!/bin/python ''' script to plot ABC ''' import os import sys import h5py import getpass import numpy as np import corner as DFM # -- abcpmc -- import abcpmc # -- galpopfm -- from galpopfm import dustfm as dustFM from galpopfm import dust_infer as dustInfer from galpopfm import measure_obs as measureObs # -- p...
"""test_mainmodel.py - tests the mainmodel module <NAME> (TRI/Austin, Inc.) """ __author__ = '<NAME>' import models.mainmodel as model import models.dataio as dataio import models.abstractplugin as abstractplugin import models.config as config import models.ultrasonicgate as ultrasonicgate import controllers.pathfin...
from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten, Lambda from keras.optimizers import Adam, SGD from keras.callbacks import ModelCheckpoint, LearningRateScheduler, ReduceLROnPlateau from ke...
import argparse import os import logging import random import time import torch import torchvision import torch.nn as nn from sklearn import metrics import matplotlib.pyplot as plt from sklearn.svm import SVC from sklearn.multiclass import OneVsRestClassifier from sklearn.metrics import confusion_matrix from datahelp...
import pandas import numpy as np from cornellGrading import cornellQualtrics import os def genReadingAssignments(infile, outfile): # generate reading assignments # infile must be xlsx with two sheets (Readers & Canddiates) # grab all input data if isinstance(infile, str): tmp = pandas.ExcelFi...
import pandas as pd import plotly.express as px import os import sys from datetime import datetime import time import gzip import plotly import shutil import plotly.graph_objects as go # class GroupBucket(list): JANUS_HOME = "/Users/dporter/projects/janus" def get_py(py): """helper function that returns name of...
import re import subprocess import os import opentamp from core.internal_repr.action import Action from core.internal_repr.plan import Plan CLEANUP = False PATCH = True class HLSolver(object): """ HLSolver provides an interface to the chosen task planner. """ def __init__(self, domain_config=None, ab...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # Copyright 2020 InterDigital Communications, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
# -*- coding: utf-8 -*- # Copyright 2015-2016 Telefónica Investigación y Desarrollo, S.A.U # # This file is part of FIWARE project. # # 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: # # htt...
#!/usr/bin/env python3 import json import argparse import pickle from collections import defaultdict import numpy as np import pandas from loom_reader import LoomReader from cluster import cluster as get_clusters from delaunay import DictDelaunay2d from sklearn import decomposition def octagon(poly): ''' R...
# This code is licensed under the MIT License (see LICENSE file for details) from PyQt5 import Qt import pkg_resources from . import device_widget from . import status_widget from ..simple_rpc import rpc_client from .. import util class MicroscopeWidget(device_widget.DeviceWidget): PROPERTY_ROOT = 'scope.' P...
""" Wrapper around plotly for many parallel files. This is intended as a module/library to make easy plots from data. E.g. Plotly is great and allows shaded areas, toggleable lines, etc... but the API is ridiculously complicated, and has unuseful defaults -e.g. legend ordering. Particularly data where there are many...
# coding: utf-8 import os.path from Modelizer import * from ConvertOsim2Biorbd import * from Converter import * import tkinter as tk from tkinter import ttk from tkinter import filedialog class ToolMenu(tk.Menu): def __init__(self, mainmenubar, *args, **kwargs): tk.Menu.__init__(self, mainmenubar, *args,...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Phasmophobia Solver """ #--------------------------------------- # Script Import Libraries #--------------------------------------- import clr clr.AddReference("IronPython.Modules.dll") import os import codecs import json import re try: from streamlabs_stub import * ...