text
stringlengths
8.04k
46.5k
import re from hashlib import md5 from collections import OrderedDict from app.readers import tsv as tsvreader from app.readers import fasta as fastareader from app.dataformats import mzidtsv as mzidtsvdata from app.lookups.sqlite import psms as lookups DB_STORE_CHUNK = 100000 def create_header(oldheader, genes, p...
import numpy as np import cv2 import random import time import math import torchvision.transforms as transforms import torchvision.transforms.functional as F from matplotlib.pyplot import imread, imsave import os import sys from PIL import Image import argparse args = argparse.ArgumentParser(description='the option of...
import discord from discord.ext import commands import datetime import sys import emoji import pycountry from utilities import checks sys.path.insert(0, "..") from units.time import duration_to_string sys.path.pop(0) def setup(bot): bot.add_cog(Lichess(bot)) class LichessUser(commands.Converter): async def co...
# Copyright 2016, Yahoo Inc. # Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms. import logging import re from collections import OrderedDict, namedtuple from functools import partial from textwrap import dedent from types import SimpleNamespace i...
#!/usr/bin/env python """ Wraps h5py (http://www.h5py.org/). Hazen 12/17 """ import h5py import numpy import os import sys import time import storm_analysis.sa_library.grid_c as gridC # This is the maximum size of a dataset in a group of tracks. track_block_size = 10000 class SAH5PyException(Exception): pass ...
#!/usr/bin/env python3 # # (C) Copyright 2020 Hewlett Packard Enterprise Development LP. # Licensed under the Apache v2.0 license. # import re import sys import copy import json import pprint from km.routers.router import Router PRETTY_PRINT_WIDTH = 220 # ===========================================================...
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import collections import queue import weakref import time import random import numpy as np import math import carla from carla import ColorConverter from carla import WeatherParameters from .map_utils import Wrapper as map_utils PRESET_WEATHERS = { 1: WeatherParameters.ClearNoon, 2: WeatherParameters.Clo...
# -*- coding: utf-8 -*- # # Copyright 2015 error.d # by <EMAIL> # 2015-04-23 # # # AML -- Assembly&Map Language # import copy import logging class AMLStateMachine(object): """ core logic: result = template + data core state machine transform: struct_check -> basestring -> assignment -> stop...
import pickle import logging import numpy as np import pandas as pd from collections import Counter from typing import Union, Sequence, Optional, List, Any from sklearn.base import BaseEstimator from indra.statements import Evidence, Statement, get_all_descendants from indra.belief import BeliefScorer, check_extra_evid...
# Copyright 2018 <NAME> <EMAIL> # 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 ...
from . import shadergraph_utils from ..rman_constants import NODE_LAYOUT_SPLIT from .. import rman_config from .. import rfb_icons import bpy import re def draw_indented_label(layout, label, level): for i in range(level): layout.label(text='', icon='BLANK1') if label: layout.label(text=label) ...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2018-2020 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2012 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
""" Backend interface for the pymcuprog utility. This module is the boundary between the Command Line Interface (CLI) part and the backend part that does the actual job. Any external utility or script that needs access to the functionality provided by pymcuprog should connect to the interface provided by this backend...
## Adafruit Feather nRF52840 Sense all-the-devices demo ## ## https://www.adafruit.com/product/4516 ## https://learn.adafruit.com/adafruit-feather-sense/ ## https://circuitpython.org/board/feather_bluefruit_sense/ ## ## Board has 6 i2c addresses in use: ## ## * 0x1C / 28 : LIS3MDL Magnetometer https://github.com/adafr...
# ******************************************************************************* # Copyright (C) 2020 INAF # # This software is distributed under the terms of the BSD-3-Clause license # # Authors: # <NAME> <<EMAIL>> # ******************************************************************************* from astropy.io.fits...
import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin from tqdm import tqdm import itertools from sklearn.pipeline import Pipeline # + import sys from pathlib import Path home = str(Path.home()) from . import utils from . import construct #sys.path.insert(0,"%s/rankability_t...
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from future import standard_library import argparse import math import os import pkg_resources import re import subprocess import stat import sys import fnmatch impor...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable # import numpy as np class Linear(nn.Module): def __init__(self, in_features, out_features, dropout=0.0): super(Linear, self).__init__() self.linear = nn.Linear(in_features=in_features, out_feat...
from socket import * import datetime import os import time import random import threading from _thread import * import shutil # to implement delete method import csv # used in put and post method to insert data import base64 # used for decoding autherization header in delete method import sys import logging from con...
from fm_behavioral import * from robust_corr import skipped_corr '''RECOGNITION MEMORY''' #a priori memory enhancement effect (CS+ > CS-) df = pd.read_csv('../cleaned_corrected_recognition.csv') df = df.set_index(['group','condition','encode_phase','subject']).sort_index() '''Retroactive effect: Baseline CS+ > ...
from textblob import TextBlob import csv import nltk import string import tweepy import re from wordcloud import WordCloud import unidecode import matplotlib.pyplot as plt import pandas as pd import numpy as np import scipy #import statsmodels.api as sm #import statsmodels.formula.api as smf import seaborn as sns imp...
#!/usr/bin/env python3 """ Extracts a spectrum from a region in a spectral cube. The pixels will be averaged spatially inside the given region. The region must be specified as shape,coords,frame,parameters Region can be, point, box, circle or ellipse. Also, CASA region files are supported. Coords can be pix or sky. Fr...
from __future__ import absolute_import from __future__ import print_function import os import os.path import random import six from six.moves import urllib, queue, range, zip, reduce, cPickle as pickle import marshal import struct import time import heapq import uuid import itertools from operator import itemgetter fro...
# Copyright 2021 <NAME> # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistr...
# ##### BEGIN GPL LICENSE BLOCK ##### # KeenTools for blender is a blender addon for using KeenTools in Blender. # Copyright (C) 2019 KeenTools # 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, ...
""" Output/model results file interfaces. All defined classes are attached to project and run instances as propertyplugin that return a pandas.DataFrame. For files to be read from the SWIM project, a from_project method needs to be defined. To read the data from a run instance, a method refering to the extension of a ...
from itertools import chain from contextlib import contextmanager from collections import namedtuple, deque, defaultdict from .refs import ArgRef, FieldRef, ItemRef, Reference, is_from_arg, CtxRef from .nodes import Tuple, Number, Keyword, String, List, Symbol, Placeholder from .nodes import NodeVisitor, NodeTransform...
import json import os from binascii import hexlify import redis from django.conf import settings from django.core.management import call_command from django.test import TestCase from freezegun import freeze_time from .occupeye.api import OccupEyeApi from .occupeye.cache import OccupeyeCache from .occupeye.constants i...
import math import os import time import numpy as np from os.path import exists from os import mkdir import logging import torch from torch import optim from torch.optim.lr_scheduler import LambdaLR from torch.utils.data import DataLoader import torch.nn.functional as F from tensorboardX import SummaryWriter from ut...
import time from typing import * from tkinter import * import enum from typing import List from math import * from PIL import ImageTk, Image, ImageDraw2 import numpy as np import sys # angle_k = 0.0 size: Callable circle: Callable ellipse: Callable triangle: Callable square: Callable rect: Callable fi...
from scipy.integrate import * import scipy.optimize import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit from functools import partial import os, sys periSampl = 1000 class Parameters: mu0 = 4 * 3.1415927 * 1e-7 gamma = 2.2128e5 alpha = 0.01 Js = 1 K1 = -181476 ...
""" Scan input, temporary and output directories and count the number of reads (sequences) processed by specific stages of a workflow. The scan is based on the configuration, directory structure and file patterns used by the workflow. The following information is included: * Input files: number of reads in the FASTQ ...
''' prep.py : reads and prepares raster files for time series feature extraction authors: m.mann & a.bedada ''' import numpy as np import glob import os.path import pandas as pd import geopandas as gpd import rasterio from rasterio import features import gdal from re import sub from pathlib import Path def set_df_m...
#!/usr/bin/python3 #################### # Preliminary steps #################### ### Import necessary packages from param_file import PREPARE_TRAIN_VALID_TEST_FILES import pandas as pd import numpy as np import time #import logging import csv import random import string #from tqdm import tqdm import nltk from nltk.s...
# Modified by Weijia # ------------------------------------------------------------------------ # Modified from DETR (https://github.com/facebookresearch/detr) # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # ------------------------------------------------------------------------ import numpy a...
#The three major datasets used: from . import drugClassDataset from . import drugNameDataset from . import drugClassSynonymDataset from . import greekAlphabet classes = drugClassDataset.classes drugs = drugNameDataset.drugs class_synonyms = drugClassSynonymDataset.class_synonyms greek_alphabet = greekAlphabet.gree...
# 11 jan import time import functools import sys import pandas as pd import numpy as np from glob import glob from hypnospy import Wearable, Experiment, Demographics from hypnospy.data import MESAPreProcessing, HCHSPreProcessing from hypnospy.analysis import NonWearingDetector, SleepBoudaryDetector, Viewer, PhysicalAct...
""" Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copie...
# Generic model training wrapper functions # # <NAME>, 2020 # <EMAIL> import math import numpy as np import torch import argparse import pprint import os import datetime import json import pickle import sys import yaml import copy #import graphviz import torch_geometric from termcolor import cprint # xgboost import ...
import os import pickle import argparse from tqdm import tqdm import numpy as np import numpy.random as npr import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib.font_manager import FontProperties from pybasicbayes.models import FactorAnalysis from pybasicbayes.distributions import \...
# -*- coding: utf-8 -*- """ @author: <NAME> <<EMAIL>>, January 2017 / February 2018. """ import numpy as np from scipy.stats import multivariate_normal import time from joblib import Parallel, delayed import sys from functools import reduce from scipy.stats import triang import torch from scipy.signal imp...
#! /usr/bin/env python # encoding: utf-8 # DC 2008 # <NAME> 2010 (ita) import re from waflib import Utils from waflib.Tools import fc, fc_config, fc_scan, ar from waflib.Configure import conf @conf def find_ifort(conf): fc = conf.find_program('ifort', var='FC') conf.get_ifort_version(fc) conf.env.FC_NAME = 'IFORT'...
"""Deep Averaging Networks for text classification - pytorch, spacy, deep averaging networks - GloVe word embeddings, frozen and fine-tuned weights - S&P Key Developments <NAME> License: MIT """ # jupyter-notebook --NotebookApp.iopub_data_rate_limit=1.0e12 import numpy as np import os import time import re import csv...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
# Copyright 2021 <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, softwar...
#!/usr/bin/env python3 # # Copyright 2018 The Hafnium Authors. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/BSD-3-Clause. """Script which drives invocation of tests and parsing their output to produce a results report. ""...
import sys from contextlib import contextmanager from flatten_dict import flatten from itertools import chain from nasframe.utils.torch import * from nasframe import FeedForwardCoach from torch.utils.data import DataLoader from nasframe.utils import make_dirs, Bunch, get_tqdm from nasframe.utils import get_logger, Fi...
from collections import OrderedDict import sys import os import re import random from pathlib import Path import hashlib import json import yaml import subprocess from logic.logic import Logic from logic.hints import Hints import logic.constants as constants from logic.placement_file import PlacementFile from gamepatc...
# # ISC License # # Copyright (C) 2021-present DS-Homebrew # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND TH...
#coding=utf8 import os import numpy as np import pickle # from lib.net.point_rcnn import PointRCNN # from lib.datasets.mada_rcnn_dataset import MadaRCNNDataset # import tools.train_utils.train_utils as train_utils # from lib.utils.bbox_transform import decode_bbox_target # from tools.kitti_object_eval_python.visualize_...
""" title: URL routes for the app """ import logging from flask import render_template, flash, redirect, url_for, request, make_response from app import app, db, nav from app.forms import LoginForm, SigninForm, ManualEntryForm, TeacherDash, TeachersAvailable, CenterOpen, \ StudentReport, OnlineSigninForm, EnrollSt...
""" This module contains the file system tree view. """ import sys import locale import logging import os import platform import shutil import subprocess from pathspec import PathSpec from pyqode.qt import QtCore, QtGui, QtWidgets from pyqode.core import icons def _logger(): return logging.getLogger(__name__) d...
# This file is part of the # Bartolina Project (https://github.com/exiliadadelsur/Bartolina). # Copyright (c) 2020 <NAME> and <NAME> # License: MIT # Full Text: https://github.com/exiliadadelsur/Bartolina/blob/master/LICENSE """Bartolina : real space reconstruction algorithm for redshift.""" import astropy.const...
import bottle #https://gist.github.com/oz123/62bfeb31244cd2ee6411c1ed2a0e00b7 from bottle.ext import beaker from bottle import route, run, template, response, request, hook import rdkit import hdbscan import pickle #app = bottle.app() # --------- session management --------- session_path = './session_data' session_...
from PySide import QtCore, QtGui from whatsapp_ui import Ui_WhatsAppBrowser import os, sys, sqlite3, shutil, threading, webbrowser from datetime import datetime from collections import namedtuple PLUGIN_NAME = "WhatsApp Browser" import plugins_utils ###################################################################...
#!/usr/bin/python # # Copyright (C) 2010 The Android Open Source 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
@profile def _lcs2(hash1, hash2, open_to_close, node_affinity, open_to_tok, _memo, hash_decomp1, hash_decomp2, seq_to_hash1, seq_to_hash2): if not hash_decomp1[hash1][0] or not hash_decomp1[hash2][0]: seq1, a1, b1, head1, tail1, head1_tail1 = hash_decomp1[hash1] seq2, a2, b2, head2, tail2, head2_t...
# -*- coding: utf-8 -*- import ubelt as ub import six class _ConstHelper(type): """ Adds code and nice constants to an integer version of a class """ def __new__(cls, name, parents, dct): """ cls = META_DECISION code_cls = META_DECISION_CODE """ cl...
# Copyright 2021, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Python interface to the Chandra Data Archive (CDA) web services and an interface to a local disk copy of the Observation Catalog (Ocat). """ from pathlib import Path import re import warnings import time import requests import numpy as np import tables...
# This file is 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 # distrib...
''' Author: <NAME> ''' from __future__ import print_function import tensorflow as tf from tensorflow.python.ops import ctc_ops as ctc from tensorflow.python.ops import rnn_cell from tensorflow.python.ops.rnn import bidirectional_rnn from util.LoaderUtil import read_image_list, get_list_vals from random import shuffle...
import discord from datetime import datetime, timedelta from . import commandsDB as bbCommands from .. import bbGlobals, lib from ..bbConfig import bbConfig, bbData from ..bbObjects.battles import DuelRequest from ..scheduling import TimedTask from ..reactionMenus import ReactionMenu, ReactionDuelChallengeMenu bbCom...
# Train joint systems using reinforcement # learning import argparse import os import pickle import random from collections import deque, namedtuple import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from tqdm import tqdm from utils.plot_utils import plot_score_distribution, plot_d...
import sys, os, cv2 from core.common import MishLayer,BatchNormalization from absl import app, flags, logging from absl.flags import FLAGS from core.accumulator import Accumulator import os, shutil import tensorflow as tf from core.yolov4 import YOLO, compute_da_loss_instance, compute_loss, compute_da_loss, decode_trai...
""" An experimental implementation of S3 in stor """ from functools import partial import logging from multiprocessing.pool import ThreadPool import os import tempfile import threading import warnings import boto3 from boto3 import exceptions as boto3_exceptions from boto3.s3.transfer import S3Transfer from boto3.s3.t...
# Copyright 2018-2019 <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, soft...
import collections import hashlib import os import os.path import re import subprocess import statistics import sys import jinja2 import markupsafe import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.colors as mcol infty = float("inf") DIR =...
import collections import heapq import random from typing import List def merge(intervals: List[List[int]]) -> List[List[int]]: result = [] intervals.sort(key=lambda x: x[0]) for interval in intervals: if not result or result[-1][1] < interval[0]: result.append(interval) else: ...
import os import time import sys import tty import termios import random import hotcold # to do: boss zone triggering the hot cold game, item del after pick up, bug fixing, story between level 1&2 & 2&3. def intro(): """intro screen, self explanatory""" os.system('clear') print("\n\n Welcome to the ...
# # Copyright (c) 2018, <NAME> # This file is licensed under the terms of the MIT license. # # # azimuth-range FFT heatmap - 2D plot # import os, sys, copy, math from math import sqrt import cv2 as cv import random as rng rng.seed(12345) import tkinter as tk from tkinter import filedialog #try: import numpy as...
#!/usr/bin/env python3 import os import re import sys import math import glob import argparse import pandas as pd from datetime import datetime from ruamel.yaml import YAML from ruamel.yaml.scalarstring import FoldedScalarString as fss from ruamel.yaml.scalarstring import DoubleQuotedScalarString as dbl_quote from rua...
""" File: ST.py Descipt: ST SensorTile kit module, sensors drive and basic function Author: Shaoziyang Version: 1.0 DATE: 2017.2 home: http://www.micropython.org.cn/ usage: """ import pyb import machine from machine import Pin, I2C __author__ = "shaoziyang <<EMAIL>>" __...
""" Python implementation of the LiNGAM algorithms. The LiNGAM Project: https://sites.google.com/site/sshimizu06/lingam """ import graphviz import numpy as np from sklearn import linear_model from sklearn.linear_model import LassoLarsIC, LinearRegression from sklearn.utils import check_array import igraph as ig from s...
# Copyright (c) 2017 Cisco Systems, 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 re...
# -*- coding: latin-1 -*- # Copyright CERFACS (http://cerfacs.fr/) # Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) # # Author: <NAME> """ Types of temporal aggregations (slice_mode): - 'month' (all months of year) - 'year' - 'DFJ' - 'MAM' - 'JJA' - 'SON' - 'ONDJFM' - 'AMJJAS' - user sele...
#-*- coding: utf-8 -*- ############################################################################################# #g2p_cw_rules.py #Author: <NAME> #Location: University of Malta #Date: July 2019 #Presentation: #This file contains the g2p_cw_rules() that applies the CrimsonWing Grapheme-to-Phoneme #rules. #The ...
#!/usr/bin/env python # python3.6 calculate_stats.py --raw_output_dir "$(pwd)/results/xyz" --analysis_dir "$(pwd)/analysis" import argparse import sys import re import math from os import listdir from os.path import isfile, join, basename from pathlib import Path from RoundStats import RoundStats from MemberStats im...
import json, os from collections import defaultdict import operator import util import argparse from tqdm import tqdm import numpy as np class KB(object): """Class for freebase""" def __init__(self, input_file, create_vocab=False, vocab_dir=''): self.input_file = input_file self.create_vocab =...
""" Adaptive Multisite Random Walk Metropolis Hastings Transition Kernel. """ """ Authors: <NAME> and <NAME> """ """ Version: 0.0.16 """ """ Date: 16/10/2020 """ import collections import numpy as np import tensorflow as tf from tensorflow_probability.python import stats from tensorflow_probability.python.distributio...
import zipfile import os import numpy as np import pandas as pd from pathlib import Path __version__ = '0.155' try: from functools import lru_cache except (ImportError, AttributeError): # don't know how to tell setup.py that we only need functools32 when under 2.7. # so we'll just include a copy (*bergh*)...
from __future__ import annotations import asyncio from contextlib import contextmanager from contextvars import ContextVar, Token from enum import IntEnum, auto from functools import wraps from typing import ( Any, AsyncGenerator, AsyncIterator, Callable, Dict, Iterable, List, Optional,...
import asyncio import logging import yaml import random import os import string import time from datetime import datetime from fuzzywuzzy import process import discord from redbot.core.data_manager import cog_data_path from redbot.core.utils.menus import start_adding_reactions, menu, DEFAULT_CONTROLS from typing impo...
from copy import deepcopy import itertools import numpy as np import torch from torch.optim import Adam from spinup.utils.run_utils import set_mujoco; set_mujoco(); import os import gym import time import spinup.algos.pytorch.mbfq.core as core from spinup.utils.logx import EpochLogger from .spline_model import SparseDe...
# ------------------------------------------------------------------------ # Generate a train dataset from whole slide images # # Place TP53 and H&E slides in a single directory # TP53 slides must be named : SlideName_Pathology_TP53 # e.g. patient123_N_TP53.svs for a normal slide or patient123_T_TP53.svs for a...
import pandas as pd import numpy as np import datetime def clean_dates(df_in): df = df_in.copy() df_types = df.dtypes date_cols = list(df_types.loc[df_types=="datetime64[ns]"].index) + ["covid19_admission_hospital_release","covid19_admission_hospital_date","covid19_date_lab_test", ...
""" Implements significance tests for periodic signals in presence of red noise form Vaughan 2005A&A...431..391V """ # import math import warnings import operator import functools as ftl import itertools as itt import multiprocessing as mp import numpy as np from scipy.integrate import quad, dblquad from scipy.optimi...
import os import sys import time import glob import numpy as np import torch import utils import logging import argparse import torch.nn as nn import torch.utils import torch.nn.functional as F import torchvision.datasets as dset import torch.backends.cudnn as cudnn from torch.autograd import Variable from model_searc...
# ##### BEGIN MIT LICENSE BLOCK ##### # # Copyright (c) 2015 - 2017 Pixar # # 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 u...
''' This file modifies standard TensorFlow modules necessary for transfer learning, such as MonitoredTrainingSession, ChiefSessionCreator, Scaffold, SessionManager ''' import re import time import tensorflow as tf from tensorflow.python.ops import resources from tensorflow.python.training import saver as training_save...
import bottle import os import random import numpy as np import time import collections @bottle.route('/') def static(): return "the server is running" @bottle.route('/static/<path:path>') def static(path): return bottle.static_file(path, root='static/') @bottle.post('/start') def start(): return Star...
import sys import itertools from functools import reduce from operator import iadd import numpy from AnyQt.QtWidgets import ( QFormLayout, QGraphicsRectItem, QGraphicsGridLayout, QGraphicsWidget, QApplication, ) from AnyQt.QtGui import ( QFontMetrics, QPen, QIcon, QPixmap, QLin...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
from __future__ import annotations import typing from typing import Any, Optional, Dict, List, Union, Callable, Tuple, Optional from dataclasses import fields, is_dataclass, asdict import pydantic from dataclasses_json import dataclass_json try: from typing import Literal except ImportError: from typing_exten...
import hydra import numpy as np from omegaconf import DictConfig, OmegaConf import gym from stable_baselines3 import SAC from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.vec_env.vec_normalize import VecNormalize f...
import collections import gzip import logging import math import os import pathlib import pickle import re import sys import zipfile from bisect import bisect_left import numpy as np import requests from loguru import logger from tqdm import tqdm #######################################################################...
import pytz from django.contrib.auth.models import User from django.contrib.staticfiles.templatetags.staticfiles import static from django.http import Http404 from django.utils.datastructures import SortedDict from django.utils.html import conditional_escape from django.utils.translation import ugettext_lazy as _ from...
from PIL import Image import numpy as np import keras.backend as K from keras.layers import Input, Lambda from keras.models import Model, model_from_json import cv2 import tensorflow as tf import sys from visualization_flags import FLAGS from yolo3.model import tiny_yolo_body from tensorflow.python.framework import ops...