text stringlengths 8.04k 46.5k |
|---|
"""
Layouts and container widgets that show a "panel" of signals.
Layouts:
* :class:`SignalPanel`
* :class:`CompositeSignalPanel`
Container widgets:
* :class:`TyphosSignalPanel`
* :class:`TyphosCompositeSignalPanel`
"""
import functools
import logging
from functools import partial
import ophyd
from ... |
# Copyright 2020 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
from __future__ import print_function
import curses
import curses.textpad
import curses.wrapper
import json
import locale
import re
import subprocess
import sys
import urllib
import urllib2
import argparse
import time
import os
# Define possible player modes.
MPLAYER_MODE="mplayer"
OMXPLAYER_MODE="omxplayer"
MPV_MOD... |
# Orignated from maximus009/VideoPlayer
# https://github.com/maximus009/VideoPlayer
"""
9/14/2020 wi Bug fix
# freeze_end[epoch,i] = current_frame Identified bug 9/14/2020 wi
freeze_end[epoch,i] = current_frame - 1
6/3/2021 wi add key
ord('a'): 'prev_frame', ord('d'):... |
import string
import warnings
import numpy as np
from pandas import (
DataFrame,
MultiIndex,
NaT,
Series,
date_range,
isnull,
period_range,
timedelta_range,
)
from .pandas_vb_common import tm
class GetNumericData:
def setup(self):
self.df = DataFrame(np.random.randn(1000... |
import os
from calendar import monthrange
from datetime import MINYEAR, date
from pathlib import Path
from tkinter import *
from tkinter import filedialog, messagebox
from tkinter.ttk import *
from typing import List, Tuple, Union, Dict, Any, Generator, Callable, Optional
import pytz
from weather.configuration import... |
"""
This program contains code adapted from: Lyre Midi Player (https://github.com/3096/genshin_scripts/blob/main/midi.py)
which is under the GNU General Public License.
Application.py:
Contains:
- the base application class
- file parsing code
- definition of commonly ... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
import ptypes, time, datetime
from . import EV_, E_IDENT, section, segment
from .base import *
class ET_(pint.enum, Elf32_Half):
_values_ = [
('NONE', 0),
('REL', 1),
('EXEC', 2),
('DYN', 3),
('CORE', 4),
# ET_LOOS(0xfe00) - ET_HIOS(0xfeff)
# ET_LOPROC(0xff00... |
import numpy as np
import torch
import typing
import nptyping
import dataclasses
from torch.utils.data import Dataset, DataLoader
from torch.utils.tensorboard import SummaryWriter
from sklearn.metrics.pairwise import euclidean_distances
import pickle
import os
from logging import getLogger, StreamHandler, DEBUG
logger ... |
import logging
import copy
from itertools import count
import claripy
from claripy.vsa import ValueSet, RegionAnnotation
from ..storage.memory import SimMemory, AddressWrapper, MemoryStoreRequest
from ..errors import SimMemoryError, SimAbstractMemoryError
from ..sim_options import KEEP_MEMORY_READS_DISCRETE, AVOID_MU... |
""" Discrete event simulator
:Author: <NAME> <<EMAIL>>
:Date: 2016-06-01
:Copyright: 2016-2020, Karr Lab
:License: MIT
"""
from collections import Counter, namedtuple
from datetime import datetime
import cProfile
import heapq
import math
import os
import pstats
import tempfile
from de_sim.config import core
from de_... |
# vim: sw=4:ts=4:et:cc=120
import base64
import hashlib
import io
import ipaddress
import logging
import os.path
import pickle
import re
import unicodedata
from subprocess import Popen, PIPE
import saq
from saq.analysis import Observable, DetectionPoint
from saq.constants import *
from saq.email import normalize_ema... |
# Copyright (c) 2018, <NAME>
# All rights reserved.
#
# This file is part of the yambopy project
#
import os
from itertools import product
from yambopy import *
from cmath import polar
from yambopy.units import *
from yambopy.plot.plotting import add_fig_kwargs
from yambopy.lattice import replicate_red_kmesh, calculat... |
"""
To Do:
-Add an optional input for the networks so they can be defined in a main run script.
-Test
-Combine Training Operation
"""
from .method import Method
from .buffer import Trajectory
from .AdvantageEstimator import MultiStepDiscountProcessing
import tensorflow as tf
import numpy as np
from utils.utils import ... |
import pygame
import sys
import random
import time
import re
from circuit import *
from pygame.locals import *
from qiskit.visualization import plot_histogram
BLACK = (0,0,0)
WHITE = (255,255,255)
RED = (255,0,0)
GREEN = (0,255,0)
BLUE = (0,0,255)
GREY = (200,200,200)
LEFT_CLICK = (1,0,0)
RIGHT_CLICK = (0,0,1)
pyg... |
import calendar
from collections import namedtuple
from datetime import date
from math import floor
from typing import Set
class Address:
def __init__(self, street: str, number: int, postal_code: int, city: str):
self.street = street
self.number = number
self.postal_code = postal_code
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import matplotlib.patches as patches
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import mean_squared_error, mean_absolute_error
from matplotlib.offsetbox import OffsetImage, AnnotationBbox
from matplotlib.collections import PatchCollection
import ... |
# Copyright 2017 <NAME> Society
# Distributed under the BSD-3 Software license,
# (See accompanying file ./LICENSE.txt or copy at
# https://opensource.org/licenses/BSD-3-Clause)
# Various attempts at improving the WAE
import tensorflow as tf
import numpy as np
import wae
import os
import logging
from models import enc... |
## pip install torch-encoding --pre
"""ResNet variants"""
import math
import torch
import torch.nn as nn
### Split-attention
"""Split-Attention"""
import torch
from torch import nn
import torch.nn.functional as F
from torch.nn import Conv1d, Module, Linear, BatchNorm1d, ReLU
from torch.nn.modules.utils import _sing... |
import logging
import string
from datetime import datetime
from enum import Enum, auto
from inspect import stack
from os import getcwd, listdir
from random import randint, uniform
from re import search
from subprocess import PIPE, run
from time import sleep
from typing import Optional
import uiautomator2
from AllInOn... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2014 The python-semanticversion project
# This code is distributed under the two-clause BSD License.
"""Test the various functions from 'base'."""
from .compat import unittest, is_python2
from semantic_version import base
class ComparisonTestCase(un... |
import math
import sys
import wx
import scitbx.matrix
from scitbx.array_family import flex
######
# Base class for a tile object - handles access to tiles.
######
def get_flex_image(
data,
vendortype,
binning=1,
brightness=1.0,
saturation=65535.0,
show_untrusted=False,
color_scheme=0,
)... |
# <NAME> \ Samil
""" Upload """
import json
import os
import zipfile
import subprocess
import time
import math
import re
from pySmartDL import SmartDL
import asyncio
from hachoir.metadata import extractMetadata
from hachoir.parser import createParser
from telethon.tl.types import DocumentAttributeVideo
from userbo... |
# -*- coding: utf-8 -*-
"""The xonsh built-ins.
Note that this module is named 'built_ins' so as not to be confused with the
special Python builtins module.
"""
import os
import re
import sys
import types
import signal
import atexit
import pathlib
import inspect
import warnings
import builtins
import itertools
import ... |
# -*- coding: utf-8 -*-
"""Schedules define the intervals at which periodic tasks run."""
from __future__ import absolute_import, unicode_literals
import numbers
import re
from bisect import bisect, bisect_left
from collections import Iterable, namedtuple
from datetime import datetime, timedelta
from kombu.utils.obj... |
"""
Script for quick-look reductions of Keck MOSFIRE observations.
.. include common links, assuming primary doc root is up one directory
.. include:: ../include/links.rst
"""
import os
import copy
from glob import glob
from pkg_resources import resource_filename
from IPython import embed
import numpy as np
from ... |
"""
Getis and Ord G statistic for spatial autocorrelation
"""
__author__ = "<NAME> <<EMAIL>>, <NAME> <<EMAIL>> "
__all__ = ["G", "G_Local"]
import warnings
from libpysal.common import np, stats
from libpysal.weights.spatial_lag import lag_spatial as slag
from libpysal.weights.util import fill_diagonal
from .tabular im... |
# Copyright 2004-2019 <NAME> <<EMAIL>>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish,... |
# coding=utf-8
#
# This file is part of Hypothesis (https://github.com/DRMacIver/hypothesis)
#
# Most of this work is copyright (C) 2013-2015 <NAME>
# (<EMAIL>), but it contains contributions by others. See
# https://github.com/DRMacIver/hypothesis/blob/master/CONTRIBUTING.rst for a
# full list of people who may hold c... |
import requests
import json
import uuid
import hashlib
from datetime import datetime, timedelta
from celery import task
from lxml import etree
from celery.utils.log import get_task_logger
from celery.exceptions import SoftTimeLimitExceeded
from django.core.exceptions import ObjectDoesNotExist
from requests.exceptions i... |
"""
Generate sources with instruction info.
"""
from __future__ import absolute_import
import srcgen
import constant_hash
from unique_table import UniqueTable, UniqueSeqTable
from cdsl import camel_case
from cdsl.operands import ImmediateKind
from cdsl.formats import InstructionFormat
from cdsl.instructions import Inst... |
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2021, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... |
# -*- coding: utf-8 -*-
import tkinter as tk
from tkinter import messagebox
from datetime import datetime
from Analyzer import create_training_data_grey, create_training_data_rgb, shuffle_training_data
from Analyzer import prepare_training_data_np, normalize_model, train_model
from Analyzer import save_model_training_d... |
"""
coupled symmetric model:
-- no from-below coupling in of pixel info in each prediction
-- bottom-up and top-down rep have same dim and loss is directly computed between:
(future_bottom_up - present_top_down)**2
"""
from __future__ import absolute_import
from __future__ import division
from __future_... |
import logging
import random
from time import time
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import players
from game import Game
from datetime import datetime
from pathlib import Path
import shutil
import os
from random import randrange
# Default Q-Player settings
layers_size = [128, ... |
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... |
'''This example uses a convolutional stack followed by a recurrent stack
and a CTC logloss function to perform optical character recognition
of generated text images. I have no evidence of whether it actually
learns general shapes of text, or just is able to recognize all
the different fonts thrown at it...the purpose ... |
""" Main implementation of parcel model.
"""
from __future__ import print_function
from __future__ import absolute_import
from builtins import zip
from builtins import range
from builtins import object
import os
from scipy.optimize import bisect
# Parcel model imports
from . import constants as c
from . import outpu... |
# This file is Copyright (c) 2015-2019 <NAME> <<EMAIL>>
# License: BSD
# 1:4 frequency-ratio DDR3/DDR4 PHY for Kintex/Virtex Ultrascale
# DDR3: 800, 1066, 1333 and 1600 MT/s
# DDR4: 1600 MT/s
import math
from collections import OrderedDict
from migen import *
from migen.genlib.misc import BitSlip, WaitTimer
from li... |
# Copyright (C) 2011 <NAME>
# All rights reserved.
#
# This file is part of phonopy.
#
# 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... |
'''
PassportEye::MRZ: Machine-readable zone extraction and parsing.
MRZ textual representation parsing.
Author: <NAME>
License: MIT
'''
from collections import OrderedDict
class MRZ(object):
"""
A simple parser for a Type1 or Type3 Machine-readable zone strings from identification documents.
S... |
""" This module contains functions to clean a raw dataset of reaction SMILES strings, which includes
operations such as removing atom mapping and checking for invalid molecule SMILES. There is also
a function to generate a list of SMILES strings of all unique molecules in the given dataset.
NOTE: in rxn-ebm, a 'datase... |
# -*- test-case-name: twisted.python.test.test_util -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from __future__ import division, absolute_import, print_function
import os, sys, errno, warnings
try:
import pwd, grp
except ImportError:
pwd = grp = None
try:
from os import set... |
"""
Notes on wordnet ids:
in KG embeddings, have both synset and lemma nodes:
synsets are keyed by something like able.a.01register("wordnet_mention_generator")
each synset has a number of lemmas, keyed by something like able%3:00:00::
In WSD task, you are given (lemma, pos) and asked to predic... |
import re
from enum import Enum
class ColumnType(Enum):
"""
Some speical column type, pay attention to the enum prefix
"""
# mysql data type
M_HEX_BLOB = 'blob'
M_HEX_T_BLOB = 'tinyblob'
M_HEX_M_BLOB = 'mediumblob'
M_HEX_L_BLOB = 'longblob'
M_S_GIS_MUL_POINT = 'multipoint'
M... |
#!/bin/env python3
#
# This script will build a couple of comma-separated-values (CSV) file
# from XML files with STM32 eval boards and MCUs. These files can be found
# in STM32CubeMX directory, and they are named stm32targets*.xml.
#
# Just run this script with a list of XML files on the command line and
# if parsing ... |
# Copyright 2019 DeepMind Technologies Limited. 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 ... |
""" Cisco_IOS_XR_Subscriber_infra_subdb_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR Subscriber\-infra\-subdb package operational data.
This module contains definitions
for the following management objects\:
subscriber\-database\: Subscriber database operational data
Copyright (c) ... |
#!/usr/bin/env python3
import omni_const
import omni_config
import omni_unpwd
import sys
from omnissiah.db import OmniDB
from omnissiah.omnissiah import OmniProgram
from omnissiah.zbx import ZbxAPI, DBOmniZbx
select_ref_zbx_omni_map_sql = 'SELECT mapid, omni_table, omni_field, zbx_table, zbx_field FROM ref_zbx_om... |
# %%
# import subprocess
import os
from datetime import datetime, timedelta, timezone
import sys
import h5py
import numpy as np
import argparse
import json
import pytz
import subprocess
import math
import numpy.lib.recfunctions
BASE_PATH = None
DOWNLOAD_PATH = "tmp"
DATE_FORMAT = "%Y-%m-%d"
DATE_FORMAT_HF = "%Y-%m-... |
import array
import heapq
import itertools
import operator
import time
import anonlink
import minio
from celery import chord
from entityservice.async_worker import celery, logger
from entityservice.cache.encodings import remove_from_cache
from entityservice.cache.progress import save_current_progress
from entityserv... |
from keras import backend as K
import tensorflow as tf
import numpy as np
from keras import layers, initializers, regularizers, constraints
from keras.utils import conv_utils
from keras.layers import InputSpec
from keras.utils.conv_utils import conv_output_length
cf = K.image_data_format() == '..'
useGPU = True
def ... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... |
# -*- coding: utf-8 -*-
"""
Testing class for survey endpoints of the Castor EDC API Wrapper.
Link: https://data.castoredc.com/api#/survey
@author: <NAME>
https://orcid.org/0000-0003-3052-596X
"""
import pytest
from exceptions.exceptions import CastorException
from tests.test_api_endpoints.data_models import (
su... |
from __future__ import absolute_import, print_function, division
import sys
from collections import defaultdict, deque
import tensorflow as tf
from tensorflow.python.training import slot_creator
from tensorflow.contrib.opt import ScipyOptimizerInterface
from far_ho import utils
from far_ho.optimizer import Optimizer... |
########################################################################
# This example demonstrates divisive normalization
# Copyright (C) <NAME> NCBS 2018
# Released under the terms of the GNU Public License V3.
########################################################################
import matplotlib
import matplotl... |
# -*- coding: latin-1 -*-
#
# Copyright 2020-2021 Ghent University
#
# This file is part of vsc-filesystems,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
#... |
#!/usr/bin/env python3
# This software was developed at the National Institute of Standards
# and Technology in whole or in part by employees of the Federal
# Government in the course of their official duties. Pursuant to
# title 17 Section 105 of the United States Code portions of this
# software authored by NIST emp... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Mitsuba 2 documentation build configuration file
#
# The documentation can be built by invoking "make mkdoc"
# from the build directory
import sys
import os
from os.path import join, realpath, dirname
import shlex
import subprocess
import guzzle_sphinx_theme
from pat... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
The :mod:`~araucaria.xas.xasft` module offers the following functions to perform
discrete fast Fourier transforms (FFT) on a XAFS scan:
.. list-table::
:widths: auto
:header-rows: 1
* - Function
- Description
* - :func:`ftwindow`
- Returns a FT wind... |
# --------------------------------------------------------------------------------
# Copyright (c) 2017-2020, <NAME>, All rights reserved.
#
# Defines the basis structure of the change-detection tests and the
# change-point methods
# --------------------------------------------------------------------------------
impo... |
from abc import ABC
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from data import denormalize, normalize
from utils import load_data
class RelationEncoder(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super(RelationEncoder, self).__ini... |
#!/usr/bin/env python
from __future__ import division, absolute_import, print_function
import numpy as np
__all__ = ['fread']
def fread(infile, nc=0, cname=None, skip=0, cskip=0, hskip=0, hstrip=True, separator=None,
squeeze=False, reform=False, skip_blank=False, comment=None,
fill=False, fill_val... |
######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... |
#! /usr/bin/env python
""" This module provides functions useful for Sersic profiles,
including a 3d deprojected approximation for a Sersic-n function.
"""
import os
from os.path import join as joinpath
import copy
### Importing the required stuff from different modules
import numpy as np
from numpy import pi, log10,... |
# -*- coding: utf-8 -*-
import decimal
import json
from base64 import b64encode, b64decode
from binascii import hexlify, unhexlify
from email.header import decode_header
from json import dumps
from logging import getLogger
from urllib.parse import quote, unquote, urlencode
from urllib.parse import urlparse, urlunsplit,... |
#
# Copyright (c) 2012-2020 MIRACL UK Ltd.
#
# This file is part of MIRACL Core
# (see https://github.com/miracl/core).
#
# 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.apac... |
"""
Copyright 2019 <NAME>
Copyright 2019 The University of Texas at Austin
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 ... |
"""
These set of functions help the algorithms of MSAF to read and write files
of the Segmentation Dataset.
"""
from collections import Counter
import datetime
import glob
import json
import logging
import numpy as np
import os
from threading import Thread
# Local stuff
import msaf
from msaf import jams2
from msaf imp... |
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
from copy import deepcopy
from typing import Any, Dict, Iterable, List, Optional, Sequence, Set
from serialize.parse_helpers import check_keys, check_list, check_str
from... |
# coding: utf-8
# # Packages
# In[2]:
import pickle
import numpy as np
import cv2
import glob
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
get_ipython().run_line_magic('matplotlib', 'inline')
#%matplotlib qt
# # Reading and Plotting Images
# In[3]:
image = mpimg.imread('test_images/straig... |
import pygame
import os
import json
import random
from pygame.locals import *
configFileName = 'config.json'
errorsLogFileName = 'error.log'
if os.path.exists(configFileName):
with open(configFileName, 'r') as configFile:
try:
configData = json.load(configFile)
screenW... |
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Date 2017-01-12
@author: <NAME>
Program description here
Version 0.0.1
Last modified 2017-01-12
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import matplotlib.cm as cmx
import os
from tqdm import tqdm
import M... |
# -*- coding: utf-8 -*-
# Copyright © 2012-2014 by its contributors. See AUTHORS for details.
# Distributed under the MIT/X11 software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import six
from struct import pack, unpack
from .mixins import SerializableMixin
f... |
#!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... |
"""
Utility classes for parameter scans.
"""
from __future__ import print_function, division
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.collections import PolyCollection
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.ticker import LinearLocator, F... |
# CREATED:2015-09-16 14:46:47 by <NAME> <<EMAIL>>
# -*- encoding: utf-8 -*-
'''Evaluation criteria for hierarchical structure analysis.
Hierarchical structure analysis seeks to annotate a track with a nested
decomposition of the temporal elements of the piece, effectively providing
a kind of "parse tree" of the compos... |
import tensorflow as tf
import keras.backend as K
import keras.layers as layers
import numpy as np
from tensorflow.python.ops import array_ops
def focal_loss(prediction_tensor, target_tensor, weights=None, alpha=0.25, gamma=2):
r"""Compute focal loss for predictions.
Multi-labels Focal loss formula:
... |
#!/usr/bin/env python3.5
"""
NRF5-parser tool.
This script will parse the development kits of Nordic Semiconductor
from the 'developer.nordicsemi.com/' directory
"""
import fnmatch
import os
import urllib.request
import zipfile
import hashlib
from pathlib import Path
from bs4 import BeautifulSoup
from sqlalchemy im... |
# coding=utf-8
# Copyright 2022 HyperBO 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 or ag... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# MIT License
#
# Copyright (c) 2021 NEC Corporation
#
# 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 ... |
# Copyright (c) 2019 - now, Eggroll Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... |
import pandas as pd
import numpy as np
from pyomo import environ
from pyomo.environ import *
def optimization_MIP(model,
x, ## decision variables (already attached to model)
model_master, ## master table that specifies learned functions for constraints (and parameters)
... |
from collections import OrderedDict
from functools import partial
from inspect import Parameter, Signature, signature
import opcode
import sys
from types import CodeType, FunctionType, SimpleNamespace
from typing import (
cast, Any, Callable, Dict, Generic, Iterable, List, NamedTuple, NoReturn,
Optional, Tuple,... |
"""
===========================================
Testing Utilities (:mod:`discretize.tests`)
===========================================
.. currentmodule:: discretize.tests
This module contains utilities for convergence testing
Classes
-------
.. autosummary::
:toctree: generated/
OrderTest
Functions
---------
.... |
"""
A constraint is something that describes how two bodies interact with
each other. (how they constrain each other). Constraints can be simple
joints that allow bodies to pivot around each other like the bones in your
body, or they can be more abstract like the gear joint or motors.
This submodule contain all the co... |
"""
TODO: compute statistics (Hs, Tz, etc) from the denoised integrated spectra
TODO: automatic gestion of several folders
"""
from __future__ import print_function
import os
import pickle
import load_Iridium_wave_data
from datetime import datetime
from dateutil import parser
from datetime import timedelta
import fn... |
'''cgat2rdf.py - create rdf description of cgat script
====================================================
:Tags: Python
Purpose
-------
This script creates an rdf description of a cgat
script.
Usage
-----
Example::
python cgat2rdf.py bam2stats.py
Type::
python cgat2rdf.py --help
for command line help.
... |
#!/usr/bin/env python3
"""This script will take the output of cactus-align-batch (which was run on the output of cactus-graphmap-split). This would be
a set of .vg files, one for each chromosome. It will do the following in order to make a single output graph
- clip unmapped regions out of each graph
- join the ids ... |
import pytest
import numpy as np
import pandas as pd
from cascade.core.context import ExecutionContext
from cascade.input_data.configuration.construct_country import (
assign_interpolated_covariate_values,
compute_covariate_age_interval,
compute_covariate_age_time_dimensions,
get_covariate_data_by_sex... |
#!/usr/bin/python3
from flask import Flask, render_template
from bluepy import btle
from bluepy.btle import Scanner, DefaultDelegate
import sys
import time
import math
import os
import signal
###############################################################################
#
# Reverie Powerbase Control API - <NAME>
#
... |
import random
import math
from Bio import SeqIO
import pysam
import os
import numpy
from bokeh.plotting import figure, output_file, show
from bokeh.layouts import row, column, layout
from check_accuracy import *
from command_line_aligner import *
import json
from pathlib import Path
import sys
from settings import *
U... |
# -*- coding: utf-8 -*-
"""
@author: <NAME>
This is where everything is put togegher. It receives all the user-provided
specs from 'main.py' as well as the data generated by 'data_preparation.py' (or
by the user if working with real experimental data), and perform the PAHMC
algorithm for state and parameter ... |
#!flask/bin/python
# Author: <NAME>
# Modified from: <NAME>, Deltares, <NAME>, Deltares (https://github.com/switchonproject/sip-html5-data-upload)
# Their work is based on the Flask Upload Tool by <NAME> (https://github.com/ngoduykhanh/flask-file-uploader)
# which in turn is based on the jQuery-File-Upload (https://git... |
#!/usr/bin/env python
# coding=utf-8
"""
This is a script for downloading and converting the microsoft coco dataset
from mscoco.org. This can be run as an independent executable to download
the dataset or be imported by scripts used for larger experiments.
"""
from __future__ import division, print_function, unicode_li... |
import collections
import itertools
import json
from pathlib import Path
import re
import sqlite3
import string
import attr
import nltk
import numpy as np
def clamp(value, abs_max):
value = max(-abs_max, value)
value = min(abs_max, value)
return value
def to_dict_with_sorted_values(d, key=None):
re... |
import logging
import os.path
from collections import OrderedDict
import mrcfile
import numpy as np
import pandas as pd
from aspire.image import Image, normalize_bg
from aspire.image.xform import (
Downsample,
FilterXform,
IndexedXform,
LambdaXform,
Multiply,
Pipeline,
)
from aspire.operators ... |
# Copyright 2016 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.
"""This module integrates buildbucket with swarming.
A bucket config may have "swarming" field that specifies how a builder
is mapped to a recipe. If build ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.