text
stringlengths
8.04k
46.5k
import os import joblib from astropy import units from json import loads as jsonloads from json import load as jsonload from numpy import copy as npcopy from pandas import DataFrame from requests import get as requests_get, HTTPError def info_message(*args, **kwargs): message = args[0] # further arguments are r...
import dash import dash_table import base64 import datetime from datetime import date import io import dash_bootstrap_components as dbc import dash_html_components as html import dash_core_components as dcc import plotly.express as px import plotly.graph_objects as go # import dash_table from dash.dependencies import I...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import hashlib import struct from subprocess import Popen, PIPE import sys import binascii import os import shutil import argparse import platform if platform.system()=="Windows": ssl=os.path.join('Tools','openssl') else: ssl='openssl' class programentry: p_t...
""" An implementation of the dpSGD on Cifar10 Author: <NAME>, CCS, NJIT """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import os.path import time from six.moves import xrange # pylint: disable=redefined-builtin import te...
""" 本地数据查询及预处理,适用于zipline ingest写入 读取本地数据 1. 元数据所涉及的时间列 其tz为UTC 2. 数据框datetime-index.tz为None 注:只选A股股票。注意股票总体在`ingest`及`fundamental`必须保持一致。 """ import re import warnings from concurrent.futures.thread import ThreadPoolExecutor from functools import lru_cache, partial from trading_calendars import get_calendar import...
import os from ddsc.core.ddsapi import DataServiceApi, DataServiceError, DataServiceAuth from ddsc.core.util import KindType, REMOTE_PATH_SEP, RemotePath from ddsc.core.localstore import HashUtil from ddsc.core.userutil import UserUtil, DUKE_EMAIL_SUFFIX from ddsc.exceptions import DDSUserException FETCH_ALL_USERS_PAG...
#----------------------MODULES------------------- from tkinter import * import tkinter as tk import tkinter import tkinter.messagebox import time import pyperclip import webbrowser from threading import Timer from tkinter import ttk import tkinter as notebook from colour import Color matt_black = Co...
r""" Contact integrators defined for an Hamiltonian of the form $$ H(q, p, s) = \frac{p^2}2 + f(t)s^a + V(q,t), $$ or, equivalently, a Lagrangian of the form $$ L(q, \dot{q}, s) = \frac{\dot{q}^2}2 - f(t)s^a - V(q,t). $$ Here $a\in\{1,2\}$. These systems are provided via a class providing the functions - V(q,t) -...
""" Based on many sources, mainly: <NAME>'s ANS implementation: https://github.com/rygorous/ryg_rans Craystack ANS implementation: https://github.com/j-towns/craystack/blob/master/craystack/rans.py """ OVERFLOW_WIDTH = 4 OVERFLOW_CODE = 1 << (1 << OVERFLOW_WIDTH) PATCH_SIZE = (1,1) import torch import numpy as np f...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# 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...
import json import datetime from collections import defaultdict from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponseBadRequest, Http404, HttpResponse, QueryDict from django.contrib import messages from django.conf import settings from django.core.exceptions import Permis...
# %% ''' ## Advanced Lane Finding Project The goals / steps of this project are the following: * Compute the camera calibration matrix and distortion coefficients given a set of chessboard images. * Apply a distortion correction to raw images. * Use color transforms, gradients, etc., to create a thresholded binary im...
#!/bin/env python3 # Compress binary data with RLE-like format import argparse import os import sys def array2data(arr): formatted_output = "" counter = 0 for a in arr: if counter == 0: formatted_output += "\n\t" formatted_output += "{0}, ".format(a) counter = (counter +...
"""Database tools.""" import os from cStringIO import StringIO from skytools.quoting import quote_copy, quote_literal, quote_ident, quote_fqident import skytools.installer_config try: import plpy except ImportError: pass __all__ = [ "fq_name_parts", "fq_name", "get_table_oid", "get_table_pkeys", "get...
import itertools, collections import numpy from pymclevel import mclevel import pymclevel.materials import ancillary, carve, filter, vec from contour import Contour, HeightMap from carve import ChunkSeed class ChunkShaper(object): """ This does processing on a single chunk worth of data """ ...
from functools import partial, partialmethod import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import gridspec try: from gatspy import periodic except ImportError: raise ImportError('Please, pip install gatspy') from astropy.timeseries import LombScargle from .utils ...
#!/usr/bin/env python """ Author: <NAME> Contact: <EMAIL> This module provides functionality to perform filtering and processing on interaction dataframes. """ import logging from collections import Counter from collections import OrderedDict from itertools import product import pandas as pd import nu...
import types import numpy as np from contextlib import contextmanager from darr import asarray from .disksnd import DataDir, create_datadir from .utils import duration_string, check_episode, iter_timewindowindices, \ wraptimeparamsmethod, calcsecstonexthour, peek_iterable from ._version import get_versions __al...
#!/usr/bin/env python # Copyright 2019 Division of Medical Image Computing, German Cancer Research Center (DKFZ). # # 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...
import numpy as np import pandas as pd import xarray as xr import Grid from timeit import default_timer as timer err = 1e-5 limit = 1e5 alpha = 0.005 # ---- BASIC FUNCTIONS ---- def ur(mI, mB): return (mB * mI) / (mB + mI) def nu(gBB): return np.sqrt(gBB) def epsilon(kx, ky, kz, mB): return (kx**2 +...
""" Here, we define various map Entities and their associated Widgets The basic principle is that we have multiple primitive properties defined in here, and map objects will inherit from multiple to get whichever properties they need. We also define the widgets used to configure those primitive properties in here ...
import logging logger = logging.getLogger(__name__) import autosklearn.metrics import copy import joblib import numpy as np import pandas as pd import mlxtend.feature_selection import networkx as nx import sklearn.pipeline import sklearn.preprocessing from sklearn.ensemble import RandomForestClassifier from sklearn....
# -*- coding: utf-8 -*- # Copyright (c) 2018-2021 <NAME> # reports.wwdt.me is relased under the terms of the Apache License 2.0 """Flask application startup file""" import json from typing import Optional, Text import traceback from flask import Flask, redirect, render_template, request, Response, url_for from flask....
# Copyright (C) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, check out LICENSE.md import functools import re import numpy as np import torch import torch.nn as nn import torch.nn.functional as F f...
""" Copyright 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, software distribut...
#!/usr/bin/env python # coding: utf-8 import math import random import warnings import matplotlib import numpy as np import pandas as pd from tqdm import tqdm import matplotlib.pyplot as plt from scipy.stats import norm, uniform, poisson from statsmodels.distributions.empirical_distribution import ECDF def discrete_...
# -*- coding: utf-8 -*- # # This file is part of EUDAT B2Share. # Copyright (C) 2016 CERN. # # B2Share is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any...
import numpy as np HILL_KEY = [[21, 109, 119, 23, 88, 15, 116, 66], [22, 119, 70, 118, 111, 82, 121, 98], [79, 86, 2, 96, 90, 54, 95, 83], [22, 100, 113, 122, 92, 6, 52, 60], [1, 9, 9, 4, 112, 13, 26, 74], [3, 100, 92, 83, 51, 122, 102, 63], [71, 110, 92, 74, 26, 96, 92, 24], [30, 10, 85, 92, 47, 91, 114, ...
# -*- coding: utf-8 -*- from django.template import RequestContext,Context from django.shortcuts import * from .models import * from .utilidades import * from django.views.generic import TemplateView,ListView,CreateView,UpdateView,FormView from django.conf import settings from django.db.models import Q,Sum,Count,F from...
#!/usr/bin/python import os import socket import signal import sys import stat import json import base64 import time from argparse import ArgumentParser import hashlib from collections import OrderedDict from threading import Lock, Thread from copy import deepcopy import rpyc from cryptography.fernet import Fernet, I...
#!/usr/bin/python3 import os import re import time import logging import datetime from timeit import default_timer as timer from functools import lru_cache from collections import OrderedDict import numpy as np import pandas as pd import pandas_datareader import pandas_datareader.data as web import pystore import uni...
'''Basic Gomoku Program for Project 2. Contains: Game, Basic Computer Player, Basic Scoring Polynomial Author(s): mak13789, hina ''' # The tuple (d_y, d_x) represent # (1,0) direction from left to right (horizontal) # (0,1) direction from top to bottom (vertical) # (1,1) direction from upper-left to lower-right...
# Copyright 2017 The TensorFlow 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 applica...
import numpy as np from sklearn.metrics import roc_auc_score import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from os.path import join import dask.dataframe as dd import pandas as pd import seaborn as sns from collections import Counter import xarray as xr import cartopy.crs as ccrs import cartop...
# -*- coding: utf-8 -*- from __future__ import print_function from lmfit import minimize, Parameters, Parameter, report_fit, Minimizer from lmfit.minimizer import (SCALAR_METHODS, HAS_EMCEE, MinimizerResult, _lnpost, _nan_policy) from lmfit.lineshapes import gaussian import numpy as np from...
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
""" functions for building CIME models """ import glob, shutil, time, threading, gzip, subprocess from CIME.XML.standard_module_setup import * from CIME.utils import get_model, analyze_build_log, stringify_bool, run_and_log_case_status, get_timestamp, run_sub_or_cmd, run_cmd, get_batch_script_for_job f...
from tally import tally from collections import OrderedDict import json from cktgen.transformation import Rect, Transformation, Tech class GR: def __init__( self, netName=None, layer=None, width=None, rect=None): self.netName = netName self.layer = layer self.width = width self.rect = rect def enco...
############################################################################## # Copyright 2019 IBM Corp. # # 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/LI...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import collections import numpy as np import torch from torch import nn import torch.nn.functional as F import torch.nn.init as init from .builder import SPPE from .layers.Resnet import ResNet from...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
import numpy as np import ipdb import os,sys,re from nltk import word_tokenize from six.moves import cPickle as pickle from sklearn.cross_validation import train_test_split from collections import Counter from MARCO.POMDP.MarkovLoc_Grid import getMapGrid from MARCO.POMDP.MarkovLoc_Jelly import getMapJelly from MARCO.P...
""" Entry points for compass """ from __future__ import absolute_import, print_function, division import argparse import os import multiprocessing import numpy as np import pandas as pd import sys import subprocess as sp import logging import datetime import json import gzip from functools import partial from tqdm impo...
r""" Parents for Polyhedra """ #***************************************************************************** # Copyright (C) 2011 <NAME> <<EMAIL>> # # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #*******************************************...
# -- coding: utf-8 -- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
# -*- coding: utf-8 -*- """ module for implementation of indicator class, which is designed as MinIn for systems with netvalues """ import pandas as pd from pyecharts.globals import CurrentConfig, NotebookType from pyecharts import options as opts from pyecharts.charts import Kline, Line, Bar, Grid from pyecharts.comm...
# -*- coding: utf-8 -*- # Copyright 2014 - 2016 OpenMarket 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 applic...
import os from fastNLP.core.dataset import DataSet from fastNLP.core.instance import Instance from fastNLP.io.base_loader import DataLoaderRegister def convert_seq_dataset(data): """Create an DataSet instance that contains no labels. :param data: list of list of strings, [num_examples, *]. Examp...
from h2o_wave import Q, ui, app, main, data from .config import * import time from datetime import date import pandas as pd import numpy as np import base64 import io from functools import reduce import os import sys import re from report import draw_score_heatmap, draw_score_parallel_coord, draw_score_pointplot, draw...
""" Open/Manage Products Dialog Copyright (c) 2014, 2015 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, ...
"""Fixer that inserts mypy annotations into all methods. This transforms e.g. def foo(self, bar, baz=12): return bar + baz into a type annoted version: def foo(self, bar, baz=12): # type: (Any, int) -> Any # noqa: F821 return bar + baz or (when setting options['typewriter']['ann...
""" Sequence Alignment ================== """ import logging import os.path as op import subprocess import tempfile from collections import defaultdict from itertools import count, groupby import numpy as np import pandas as pd from Bio import AlignIO from Bio import pairwise2 from Bio.Align import MultipleSeqAlignmen...
from __future__ import unicode_literals import bz2 import gc import hashlib import os import warnings from django.conf import settings from django.db import models, reset_queries, connection from django.db.models import Count, Q from django.db.utils import IntegrityError from django.utils.encoding import smart_unicod...
# Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # License: BSD 3 clause import numbers import warnings from collections import Counter import numpy as np import numpy.ma as ma from scipy import sparse as sp from scipy import stats from ..base import BaseEstimator, TransformerMixin from ..utils.sparsefuncs im...
"""Yelkovan Yelkovan is a program analyser for RISC-V architecture. It detects basic blocks of risc-v assembly code and creates the control flow graph of the program. The cfg is outputted to command line as text and to pdf file as figure. The detection of the basic blocks is performed by the help of trace informa...
import argparse import os, sys import warnings import pandas as pd import time import numpy as np import yaml, csv import shutil import torch import torch.backends.cudnn as cudnn import torch.distributed as distributed import torch.nn as nn import torch.optim as optim import torchvision.datasets as dset import torchv...
# # This file is part of LUNA # # Copyright (c) 2020 <NAME> <<EMAIL>> # SPDX-License-Identifier: BSD-3-Clause """ ECP5 configuration code for LUNA. """ import time from enum import IntEnum from collections import defaultdict from .jtag import JTAGChain from .support.bits import bits class ECP5Programmer: """ ...
""" Holography observation tables. This module defines the tables: - :py:class:`HolographyObservation` - :py:class:`HolographySource` and the constants: - :py:const:`QUALITY_GOOD` - :py:const:`QUALITY_OFFSOURCE` - :py:const:`ONSOURCE_DIST_TO_FLAG` """ import os import warnings import zipfile import numpy as np im...
from concurrent import futures import time import grpc import analysis_pb2 import analysis_pb2_grpc import os import json from decimal import Decimal as D import math _ONE_DAY_IN_SECONDS = 60 * 60 * 24 def round_float(g, pos=2): if g<0: f = -g else: f = g p1 = pow(D('10'), D(str(pos+1)...
#!/usr/bin/python # -*- coding: utf8 -*- from __future__ import print_function """ .. currentmodule:: pylayers.antprop.interactions .. autosummary:: :members: """ import doctest import os import sys import glob import pdb import doctest if sys.version_info.major==2: import ConfigParser else: import config...
from __future__ import division, print_function, absolute_import from future.builtins import dict from future.builtins import super from future import standard_library standard_library.install_hooks() import contextlib import logging import threading import mock import tornado.ioloop from .discovery_failure_test impo...
# Author: <NAME> <<EMAIL>> """Color tools for plotting.""" from collections.abc import Iterator from itertools import product, chain from math import ceil import operator import numpy as np import matplotlib as mpl from matplotlib.colors import LinearSegmentedColormap, Colormap, Normalize, to_rgb, to_rgba from matplot...
# -*- coding: utf-8 -*- """Test of Fancy module This module test the various functions present in the Fancy module. """ import datetime import unittest import unittest.mock import sys import matplotlib.pyplot as plt import numpy as np from numpy.testing import assert_array_equal import pandas as pd from pandas.api.typ...
#!/usr/bin/env python r""" Provide useful ipmi functions. """ import re import gen_print as gp import gen_misc as gm import gen_cmd as gc import gen_robot_keyword as grk import gen_robot_utils as gru import bmc_ssh_utils as bsu import var_funcs as vf import ipmi_client as ic import tempfile gru.my_import_resource("ip...
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
# -*- coding: utf-8 -*- import itertools import operator import attr import distlib.markers import packaging.version import six from packaging.markers import InvalidMarker, Marker from packaging.specifiers import Specifier, SpecifierSet from vistir.compat import Mapping, Set, lru_cache from vistir.misc import dedup f...
################################################################################ # # Main library for neu-net segmentation. This implements a standard u-net # model where images are processed in each slicing orientation. # # Author: <NAME> # ##########################################################################...
import argparse from contextlib import contextmanager from functools import wraps from inspect import currentframe, stack import io from io import StringIO from pathlib import Path from itertools import zip_longest as izip_longest import os import os.path import re import sys import traceback import types try: # ...
import aiohttp import asyncio from bs4 import BeautifulSoup as BS from . import error, content, utils import random import re import json import mimetypes import time import json import re import functools #================================================================================================================...
# # calcpos.py -- module for wrapping astronomical ephemeris calculations # import math # third-party imports import numpy as np from datetime import datetime, timedelta from dateutil import tz import dateutil.parser # right now we just have pyephem... import ephem # Constants #earth_radius = 6378160.0 # TODO: more...
# -*- test-case-name: twisted.mail.test.test_mail -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Maildir-style mailbox support. """ import os import stat import socket from hashlib import md5 from zope.interface import implementer try: import cStringIO as StringIO except Import...
# -*- coding: utf-8 -*- ############################################################################### # This file is part of metalibm (https://github.com/kalray/metalibm) ############################################################################### # MIT License # # Copyright (c) 2019 Kalray # # Permission is here...
# !/usr/bin/env python3 # -*- coding: utf-8 -*- # @Author : WenRichard # @Email : <EMAIL> # @File : predict_bert_crf.py # @Software: PyCharm import pandas as pd import tensorflow as tf import numpy as np import codecs import pickle import os from datetime import time, timedelta, datetime import json import copy from ...
import numpy as np from .global_settings import BOOL_DTYPE, ID_ADD, ID_MULT, UINT_DTYPE from .helper_classes import PriorityQueue2D from .helpers_fcts_numba import ( compile_valid_options, count_num_ops, count_usage, factor_num_ops, num_ops_1D_horner, ) class FactorisationNode: """ A node...
''' P_blobs is a terminal fork of intra_blob. It calls comp_g and then comp_P (edge tracing) per terminated stack. Pixel-level parameters are accumulated in contiguous spans of same-sign gradient, first horizontally then vertically. Horizontal spans are Ps: 1D patterns, and vertical spans are first stacks ...
import functools import hashlib import json import pickle import secrets import uuid import dash.dependencies as dd import plotly from dash import Input, Output, State, MATCH, ALL, ALLSMALLER, ClientsideFunction, dcc, html, Dash, no_update from dash.dependencies import _Wildcard from dash.development.base_component im...
from math import ceil from collections import OrderedDict, defaultdict from itertools import chain import re from pprint import pprint import requests URL_BASE = "https://www.dndbeyond.com" CHARACTER_URL = URL_BASE + "/character/{id}/json" CONFIG_URL = URL_BASE + "/api/config/json" ROLL_EXPR = re.compile(r'\s*(.+?)\...
import inspect import itertools import logging import random import re import warnings from abc import abstractmethod from copy import deepcopy from pathlib import Path from tempfile import TemporaryDirectory from typing import ( TYPE_CHECKING, Any, Callable, Dict, Generic, Iterable, Optiona...
import logging import markdown_strings as md import osubot import re logging.getLogger("urllib3").propagate = False # Map name Map URL Download Download URL Mapper Mapper URL ...
#!/usr/bin/env python3 import sys import re import os import collections import pickle import pandas as pd from pandas import ExcelWriter from pandas import ExcelFile def unpack_layer_tops_product(layer_top): product = 1 for i in layer_top: product *= int(i) return product def calculate_mlu_ops_...
import numpy as np from enum import IntEnum import ctypes import platform from collections import OrderedDict from PyQt5 import QtWidgets, QtCore from easydict import EasyDict as edict from pymodaq.daq_viewer.utility_classes import DAQ_Viewer_base from pymodaq.daq_utils.daq_utils import ThreadCommand from pymodaq.daq_...
from functools import reduce from itertools import chain from .extraction import order_nodes, is_gap, is_copy, HeadDeps, ModDeps, make_functor, get_argument from .graphutils import * from .milltypes import (polarize_and_index_many, polarize_and_index, WordType, EmptyType, DiamondType, ModalType, ...
""" # Integrating Authorize.Net ### 1. Validate Currency Support Example: from frappe.integration_broker.doctype.integration_service.integration_service import get_integration_controller controller = get_integration_controller("AuthorizeNet") controller().validate_transaction_currency(currency) ### 2. Redirect ...
#!/usr/local/bin/python3 import sys import os import subprocess import getopt import pathlib import ntpath import time from configparser import ConfigParser, ExtendedInterpolation config = ConfigParser(interpolation=ExtendedInterpolation()) config.read('env.config') errorMessages = [] def printError(string, printMe=...
##### # some functions are borrowed from https://github.com/taigw/brats17/ ##### import nibabel import numpy as np import random import os import SimpleITK as sitk import pickle from scipy import ndimage import config import copy def flip_lr(data): data = copy.deepcopy(data) img = data['images'] img = np....
# coding=utf-8 # Copyright 2021 The jax_verify 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 la...
from datetime import date from datetime import datetime as dt from typing import Any, Dict, List, Optional, Tuple from xml.dom import minidom from xml.etree import ElementTree as ET from imc.models import codelists from restapi.utilities.logs import log def is_blank(my_string: Optional[str]) -> bool: return not ...
""" Sketch RNN This is a version of the LabML implementation of SketchRNN modified slightly to work with Pytorch-Lightning. LabML's implementation: https://lab-ml.com/labml_nn/sketch_rnn/ https://github.com/lab-ml/nn == Original LabML notes == This is an annotated implementation of the paper [A Neural Representati...
# 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 or at # https://developers.google.com/open-source/licenses/bsd """Convert Monorail PB objects to API PB objects""" from __future__ import division from __fut...
#!/usr/bin/env python3 # This script fetches Amazon "Order History Reports" and annotates your Mint # transactions based on actual items in each purchase. It can handle orders # that are split into multiple shipments/charges, and can even itemized each # transaction for maximal control over categorization. import arg...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Apr 22 21:46:30 2019 @author: john.onwuemeka; <NAME> """ import matplotlib.transforms as transforms from matplotlib.ticker import MaxNLocator, LogLocator import matplotlib.pyplot as plt import numpy as np from ..handlers.save_output import save_output f...
# order of read subtraction # kleb pneu -> Ptet mtDNA -> Mac -> Mac+IES -> Mic2.0 or OES # input files .fastq.gz # samtools view -b -f 4 file.bam > unmapped.bam # samtools view -b -F 4 file.bam > unmapped.bam # number of reads in bam file # samtools view -c SAMPLE.bam # counting only mapped (primary aligned) r...
#!/usr/bin/env python3.1 """rby-sprite-extract.py - extract Pokemon sprites from a ROM image. BUGS * --color=gray doesn't work * formats don't work very well with extract_all """ import struct import io import sys import os, os.path import itertools import argparse from os import SEEK_CUR from struct import pack, ...
import numpy as np from scipy.ndimage import median_filter from scipy.ndimage import gaussian_filter1d import Marsh import CCF def getP(data, centroids, aperture_radius, ron, gain, nsigma, polynomial_spacing, polynomial_order, min_column = None, max_column = None, return_flat = False, data_variance = None): """ ...
import numpy as np import random from numpy import isclose import pytest import matplotlib matplotlib.use('Agg') # use a non-GUI backend, so plots are not shown during testing from neurodiffeq.neurodiffeq import safe_diff as diff from neurodiffeq.networks import FCNN from neurodiffeq.pde import DirichletControlPoint...
import concurrent.futures import ctypes import json import logging import os.path import queue import re import shutil import subprocess as sb import tempfile import time import tkinter import tkinter.ttk as ttk import urllib.request import winreg import zipfile from ctypes.wintypes import MAX_PATH from os.path import ...
import torch import utils.basic as utils_basic import utils.geom as utils_geom # import resampler_lib.grid_interpolate as interpolate_cuda import torch.nn.functional as F def bilinear_sample3D(vox, x, y, z): B, C, D, H, W = list(vox.shape) N = list(x.shape)[1] x = x.float() y = y.float() z = z.fl...
#!/usr/bin/env python3 import argparse import logging import os import sys import platform import threading import pickle import time import queue import uuid import zmq import math import json import multiprocessing import psutil import subprocess from funcx_endpoint.executors.high_throughput.container_sched import ...
# Copyright (c) OpenMMLab. All rights reserved. from functools import partial from typing import List, Sequence, Tuple, Union import mmcv import numpy as np import torch import torch.nn.functional as F from mmcv.utils import Registry from mmdet.core import bbox2result from mmdet.datasets import DATASETS from mmdet.mod...