text stringlengths 8.04k 46.5k |
|---|
"""Multi target Haskell REPL."""
load("@bazel_skylib//lib:dicts.bzl", "dicts")
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_skylib//lib:shell.bzl", "shell")
load(":cc.bzl", "ghc_cc_program_args")
load(":private/context.bzl", "haskell_context", "render_env")
load(":private/expansions.bzl", "expand_make_va... |
# Copyright 2019-2021 by <NAME>, The James Hutton Institute.
# All rights reserved.
# This file is part of the THAPBI Phytophthora ITS1 Classifier Tool (PICT),
# and is released under the "MIT License Agreement". Please see the LICENSE
# file that should have been included as part of this package.
"""Generate edit-dist... |
import argparse
import os, sys
import os.path as osp
import torchvision
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torchvision import transforms
import network, loss
from torch.utils.data import DataLoader
import random, pdb, math, copy
from tqdm import tqdm
from scipy.spatia... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import print_function
try:
import argparse
from distutils.version import StrictVersion
from http.server import BaseHTTPRequestHandler
from http.server import HTTPServer
import ipaddress
import json
import mimetypes
import o... |
"""PhoneMetadata object definitions"""
# Based on original Java code and protocol buffer:
# resources/phonemetadata.proto
# java/src/com/google/i18n/phonenumbers/Phonemetadata.java
# Copyright (C) 2010-2011 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you m... |
# DeepSpeed note, code taken & adapted from commit 9aa94789f13ada713af36cfd8cca2fc9a7f6b79a
# https://github.com/ptillet/torch-blocksparse/blob/master/torch_blocksparse/matmul.py
import importlib
import warnings
import torch
import math
from .trsrc import matmul
from ..op_builder import SparseAttnBuilder
triton = None... |
"""
Title: English speaker accent recognition using Transfer Learning
Author: [<NAME>](https://twitter.com/fadibadine)
Date created: 2022/04/16
Last modified: 2022/04/16
Description: Training a model to classify UK & Ireland accents using feature extraction from Yamnet.
"""
"""
## Introduction
The following example s... |
import abc
import collections
import getpass
import math
import os
import os.path
import subprocess
import sys
import textwrap
import time
import warnings
from distutils.spawn import find_executable
from typing import Dict, List
import adaptive_scheduler._mock_scheduler
from adaptive_scheduler.utils import _progress, ... |
from __future__ import print_function
import argparse
import os
import shutil
import time
import augmentations
from models.cifar.allconv import AllConvNet
import numpy as np
from third_party.ResNeXt_DenseNet.models.densenet import densenet
from third_party.ResNeXt_DenseNet.models.resnextriplet import resnext29
from t... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 3 15:50:22 2020
@author: fboers
"""
#!/usr/bin/env python3
# -+-coding: utf-8 -+-
#--------------------------------------------
# Authors:
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#--------------------------------------------
# Date: 03.04.202... |
import copy
import dataclasses
import datetime
import decimal
import uuid
from collections import OrderedDict
from enum import Enum
from typing import Any, Dict, Generic, Iterable, Mapping, Tuple, Type, TypeVar
import rest_framework.fields
import rest_framework.serializers
from django.core.exceptions import Improperly... |
import random
import json
from json.decoder import JSONDecodeError
import hashlib
from copy import deepcopy
class GameController:
def __init__(self, GameClass):
self.games = {} # dict of <id, GameObject>
self.game_class = GameClass
self.games_counter = 0
def _get_new_id(self):
... |
# Copyright 2018-2021 by <NAME>, The James Hutton Institute.
# All rights reserved.
# This file is part of the THAPBI Phytophthora ITS1 Classifier Tool (PICT),
# and is released under the "MIT License Agreement". Please see the LICENSE
# file that should have been included as part of this package.
"""Assess classificat... |
import nltk
import numpy as np
import torch
import pickle
from pytorch_pretrained_bert import BertTokenizer, BertModel, BertForMaskedLM
import string
from nltk.tokenize.treebank import TreebankWordTokenizer, TreebankWordDetokenizer
from bert_embedding import BertEmbedding
import nltk
from nltk.corpus import stopwords
f... |
"""
Module which contain base methods for ml services
"""
import glob
import io
import json
import os
import shutil
import sys
import traceback
import uuid
import zipfile
from time import time
import keras
import numpy
import requests
import tensorflow
from oauthlib.oauth2 import BackendApplicationClient
from rdkit im... |
from google.appengine.ext import ndb
from google.appengine.api import search
from google.appengine.api import urlfetch
import logging
import json
import re
import urllib
from urlparse import urlparse
import webapp2
from datamodel import Author, Library, Version, Content, Dependency, Status, Sitemap
import versiontag
... |
# -*-coding:utf-8-*-
# @Time : 2018/8/2 20:43
# @Author : x00293437
import yaml
import os
import shutil
import re
import sys
import logging
import collections
import xlwt
if sys.version_info[0] > 2:
# py3k
pass
else:
# py2
import codecs
import warnings
def open(file, mode='r', buffering=-1, ... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import operator
import collections
import math
import os
import random
import zipfile
import time
import numpy as np
from six.moves import urllib
from six.moves import xrange # pylint: disable=redefined-builtin... |
from __future__ import with_statement
import pytest
from whoosh import analysis, fields, formats, highlight, qparser, query
from whoosh.codec.whoosh3 import W3Codec
from whoosh.compat import u, xrange, text_type, permutations
from whoosh.filedb.filestore import RamStorage
from whoosh.util.testing import TempStorage, ... |
# coding=utf-8
# Copyright 2021 Head2Toe 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 a... |
"""
This file is part of the accompanying code to our manuscript:
<NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., "Benchmarking
a Catchment-Aware Long Short-Term Memory Network (LSTM) for Large-Scale Hydrological Modeling".
submitted to Hydrol. Earth Syst. Sci. Discussions (2019)
You should have received a copy... |
# Link bokeh libraries
from bokeh.io import curdoc, show
from bokeh.models import Div, Label, Plot, ColumnDataSource
from bokeh.models.widgets import Button, RadioButtonGroup, Select, Slider
from bokeh.plotting import figure
from bokeh.layouts import column, row, Spacer
# Link third-party python libraries
from functoo... |
#!/usr/bin/python3
import socket
import sys
import select
import time
import logging
import sqlite3
import math
from datetime import datetime
from enum import Enum, auto
def string_values(list):
return [str(i) for i in list]
class SMSRequestState(Enum):
REQUESTED = 0
PROCESSING = 1
DONE = 2
FAILED... |
import os
import caffe_pb2
from nnir import *
import sys
import argparse
import struct
import math
import collections
# mapping from caffe layer types to nnir operators.
# pooling is mapped to either avg_pool or max_pool
# scale is fused to batch_norm if its previous layer is batch_norm or fused to mul or muladd in nn... |
import unittest
from io import StringIO
from unittest.mock import MagicMock, patch
import numpy as np
import torch
import neurox.data.extraction.transformers_extractor as transformers_extractor
class TestAggregation(unittest.TestCase):
@classmethod
def setUpClass(cls):
# State is 3 layers, 4 tokens... |
from abc import *
import copy
from datetime import date, datetime, timedelta
from decimal import Decimal
from enum import Enum
import hashlib
import json
import logging
import math
import random
from babel.numbers import parse_decimal
import ciso8601
import coolname
import coolname.data
import dateutil as du
from date... |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2022 The HuggingFace Team 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-... |
"""Version string parser and generator."""
import collections.abc
import enum
import itertools
import logging
import re
import typing as t
import packaging.version
import semver
_LOG = logging.getLogger(__name__)
@enum.unique
class VersionComponent(enum.IntEnum):
"""Enumeration of standard version components.... |
from .pyqtgraph_vini.Qt import QtCore, QtGui
import numpy as np
from .pyqtgraph_vini import *
import sys
from .pyqtgraph_vini import functions as fn
from .pyqtgraph_vini import Point
import weakref
from .pyqtgraph_vini import ItemGroup
""" Change some pyqtgraph 0.9.1 classes to do what we need. """
class WeakList(ob... |
# -*- coding: utf-8 -*-
#pylint: disable=relative-beyond-top-level, missing-function-docstring
#pylint: disable=missing-class-docstring, missing-module-docstring, invalid-name
"""
test_records
Test the Jamf object classes
"""
import unittest
import logging
from jamf import records
LOGLEVEL = logging.DEBUG
class Er... |
import os
import tensorflow as tf
import json
import random
import numpy as np
import argparse
import scipy.io
import matplotlib.pyplot as plt
import time
from datetime import timedelta
from RMI_model import RMI_model
from utils import eval_tools, visualization_util
from data_processing import text_processing, sketch_... |
import paddlehub as hub
import cv2
import numpy as np
# import pygame as pg
import time
import random
import os
import math
import copy
import glob
from ffpyplayer.player import MediaPlayer
from PIL import Image, ImageDraw, ImageFont
import argparse
import _thread
import sound
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
... |
# coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... |
from typing import Dict, List, Tuple
import logging
from core.model.graph import Graph
from core.model.lines import LinePool, Line
from core.model.periodic_ean import LineDirection
from core.model.ptn import Link, Stop
from core.util.config import Config
from common.model.net import Net, NetSection
from common.util im... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Classes to read AAS MRT table format
Ref: https://journals.aas.org/mrt-standards
:Copyright: Smithsonian Astrophysical Observatory (2021)
:Author: <NAME> (<EMAIL>), \
<NAME> (<EMAIL>)
"""
import re
import math
import warnings
import numpy as... |
# author : <NAME>
# <EMAIL>
#
# date : March 17, 2018
"""
Useful functions for the BSM flavor ratio analysis
"""
from __future__ import absolute_import, division, print_function
from functools import partial
import numpy as np
from golemflavor.enums import ParamTag, Texture
from golemflavor.misc import ... |
import os
import logging
import abc
import collections
import threading
import time
import numpy as np
from tqdm import tqdm
from quantylab.rltrader.environment import Environment
from quantylab.rltrader.agent import Agent
if os.environ.get('RLTRADER_BACKEND', 'pytorch') == 'pytorch':
from quantylab.rltrader.netw... |
from fedn.clients.reducer.interfaces import CombinerInterface
from fedn.clients.reducer.state import ReducerState, ReducerStateToString
from flask_wtf.csrf import CSRFProtect
from werkzeug.utils import secure_filename
from flask import Flask, jsonify, render_template, request
from flask import redirect, url_for, flash... |
from concurrent.futures import ThreadPoolExecutor
from functools import partial
import io
import logging
from pathlib import Path
import warnings
import boto3
import cartopy.crs as ccrs
from numba import types, generated_jit
import numpy as np
import pandas as pd
from scipy.ndimage import zoom
import xarray as xr
f... |
import boto3
import imageio
import io
from collections import defaultdict
import numpy as np
import os
import pywren
from pywren import wrenconfig as wc
from skimage.measure import compare_ssim
import sys
import tarfile
import json
import argparse
from timeit import default_timer as timer
from collections import namedt... |
from flask import request, json, Response
from flask_login import login_required, current_user
from sqlalchemy import func
from werkzeug.urls import url_encode
from app import db
from app.api import bp
from app.models import User, Pokemon
def merge_dict_lists(key, l1, l2, append=True):
merged = {}
for item ... |
from gate_sequencer import GateSequencer
opcodes = [
"movv","movd","jmpv","jmpd",
"cmpv","cmpd","jie",
"subv","subd","ret",
"mem","rem","nxt","prv","ref","drf",
"mref", "mdrf",
"exit","nop"]
def gflow(to_layer, from_layer):
"""gates for inter-layer information flow"""
return [(to_layer... |
#!/bin/bash/env python3
#<NAME>
#1.4.2021
# The model from Luo-Rudy (1990) modified as described
# in Qu et alli (2000) to exhibit spiral defect chaos
# implemented on a square computational domain.
from numba import njit, jit
import numpy as np
method='njit'
if method=='njit':
njitsu = njit
if method=='cuda':
impo... |
import numpy as np
import torch
import torch.nn as nn
import pdb
import lib.layers as layers
import lib.layers.base as base_layers
ACT_FNS = {
'softplus': lambda b: nn.Softplus(),
'elu': lambda b: nn.ELU(inplace=b),
'swish': lambda b: base_layers.Swish(),
'lcube': lambda b: base_layers.LipschitzCube(),... |
'''
The dissect module for parsing PE files.
'''
from vstruct2.types import *
from dissect.bexlab import *
DOS_MAGIC = 0x5a4d
IMAGE_DLLCHARACTERISTICS_RESERVED_1 = 1
IMAGE_DLLCHARACTERISTICS_RESERVED_2 = 2
IMAGE_DLLCHARACTERISTICS_RESERVED_4 = 4
IMAGE_DLLCHARACTERISTICS_RESERVED_8 = 8
IMAGE_DLLCHA... |
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 7 14:21:28 2021
@author: angus
"""
import streamlit as st
import pandas as pd
import plotly.figure_factory as ff
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import plotly.express as px
import numpy as np
import investpy
impor... |
from gym.spaces import Discrete
import ray
from ray.rllib.agents.dqn.dqn_tf_policy import postprocess_nstep_and_prio, \
PRIO_WEIGHTS, Q_SCOPE, Q_TARGET_SCOPE
from ray.rllib.agents.a3c.a3c_torch_policy import apply_grad_clipping
from ray.rllib.agents.dqn.dqn_torch_model import DQNTorchModel
# from ray.rllib.agents.... |
### BIFS GUI ###
### ###
### This file contains the GUI interface ###
### for the BIFS package ###
### ###
import cProfile, pstats
try:
# new in 3.7... |
import zlib # need to avoid a "core seg fault" when using matplotlib
import cscripts
import ctools
import gammalib
import json
import math
import matplotlib.pyplot as plt
import os
import statistics
import sys
from scipy.stats import norm
# version 2.1
# Example:
# MAX_SEED=10 python exec.py
# ds9 cntcube.fits -reg... |
# 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... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Author : LF - SM -TD
Date : 22/02/2020
"""
# Python Library
import matplotlib.pyplot as plt
from scipy import signal
import numpy as np
import PyGnuplot as gp
import os
from scipy.stats import linregress
from statsmodels.tsa.stattools import adfuller
from statistics ... |
# Copyright 2020 The KNIX 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 agree... |
# script for phenotyping pipeline from multiple folders of photos
# using scripts on Agisoft forums by <NAME>
# by <NAME> - UTokyo Field Phenomics Lab
# updated 2021.02.05
# compatibility Metashape Pro 1.6.5
## Incompatible Metashape Pro 1.5.x and below
# compatible with one level of nested folders
#! files in folders... |
# coding: utf-8
# # Denoising Autoencoders And Where To Find Them
#
# Today we're going to train deep autoencoders and apply them to faces and similar images search.
#
# Our new test subjects are human faces from the [lfw dataset](http://vis-www.cs.umass.edu/lfw/).
# # Import stuff
# In[1]:
import sys
sys.path.a... |
"""A.i People Counter"""
"""
Copyright [2020] [<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... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import tensorflow as tf
import sys
import pprint
import os
import time
import numpy as np
from datetime import datetime
from tensorflow.python.ops import control_flow_ops
from tensorflow.python... |
import xloil as xlo
import sys
import datetime as dt
import asyncio
import os
#
# Functions are registered by decorating them with xloil.func. The function
# doc-string will be displayed in Excel's function wizard
#
@xlo.func
def pySum(x, y, z):
'''Adds up numbers'''
return x + y + z
#
# If argument types... |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torch.nn import Linear, ReLU
from utils.utils import fields_user
from utils.utils_misc import get_root_dir
from utils.utils_preprocess import load_user_embed_and_Rs
def kernal_mus(n_kernels)... |
from typing import List, Optional, Set
from cloudformation_cli_python_lib import (
exceptions,
)
from .. import models
from . import api_helpers, validation_helpers, util
import logging
# Use this logger to forward log messages to CloudWatch Logs.
LOG = logging.getLogger(__name__)
LOG.setLevel(logging.DEBUG)
#... |
import itertools
import os
from collections import Counter
import click
import pandas
from dataclasses import dataclass
from typing import Optional, List, Dict
import numpy
import matplotlib.pyplot as plt
from pytan import DiscreteBayesNetClassifier
from sklearn import naive_bayes, metrics
from sklearn.base import Ba... |
from abc import ABC
import networkx as nx
import nolds
import numpy as np
import pandas as pd
import torch
from entropy import app_entropy, perm_entropy, sample_entropy, spectral_entropy, svd_entropy, \
detrended_fluctuation, higuchi_fd, katz_fd, petrosian_fd
from nilearn.connectome import ConnectivityMeasure
from... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2006-2009 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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; e... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from itertools import product
import torch
import torch.nn.functional as F
from ptranking.metric.srd.diversity_metric import SRD_METRIC
from ptranking.ltr_adhoc.eval.parameter import ModelParameter
from ptranking.metric.srd.diversity_metric import get_delta_alpha_dcg
fro... |
import os
import json
import logging
from itertools import chain
from hashlib import md5
from django.utils import timezone
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse
from django.dispatch import receiver
from django.db.models.signals import pre_... |
#!/usr/bin/env python
# /* ----------------------------------------------------------------------------
# * Copyright 2021, <NAME>, Aerospace Controls Laboratory
# * Massachusetts Institute of Technology
# * All Rights Reserved
# * Authors: <NAME>, et al.
# * See LICENSE file for the license information
# * ----... |
# Copyright 2020 The Forte 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 applicable ... |
# -*- coding: utf-8 -*-
import torch
import pandas
import numpy
import argparse
import time
import os
import re
import shutil
from torch.autograd import Variable
from torch.utils.data import Dataset, DataLoader
from torch.utils.data.sampler import SequentialSampler, WeightedRandomSampler
from architectures import *
fr... |
import json
import os
import sys
from glob import glob
from tqdm import tqdm
from loader.Database import DBManager, DBTableMetadata, ShortEnum
import re
class CommandType(ShortEnum):
NONE = 0
POSSIBE_NEXT_ACTION = 1
PLAY_MOTION = 2
BLEND_MOTION = 3
STOP_MOTION = 4
MOVE = 5
MOVE_TO_TARGET =... |
# @Created Date: 2020-01-12 01:27:18 pm
# @Filename: decode.py
# @Email: <EMAIL>
# @Author: <NAME>
# @Last Modified: 2020-02-11 04:22:22 pm
# @Copyright (c) 2020 MinghuiGroup, Soochow University
import os
import numpy as np
import pandas as pd
import pyexcel as pe
import tablib
from tablib import InvalidDimensions, Un... |
#!/usr/bin/env python2.7
# encoding: 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, Vers... |
import math
from tensorflow import keras
import numpy as np
import pandas as pd
from glob import glob
import tensorflow as tf
import numpy.matlib as mat
from natsort import natsorted
# from skimage.io import imread
import matplotlib.pyplot as plt
import os, json, ipdb, csv, sys
# from skimage.transform import resize... |
"""Classes required to create a Bluetooth Peripheral.
Current classes include:
- Application -- Root class
- Service -- Bluetooth Service
- Characteristic -- Bluetooth Characteristic
- Descriptor -- Bluetooth Descriptor
- Advertisement -- Bluetooth Advertisement
This requires BlueZ to have the experimental flag to b... |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
"""Class to process full HydReSGeo dataset.
Note: If IRUtils.py is not available, you need to download it before the
installation of the package into the `hprocessing/` folder:
.. code:: bash
wget -P hprocessing/ https://raw.githubusercontent.com/felixriese/thermal
-image-processing/master/tiprocessing/I... |
from typing import Optional, Callable
from glif.utils import Result, runelpi
from glif.parsing import *
from enum import Enum
import os
import html
from distutils.spawn import find_executable
import subprocess
class Repr(Enum):
''' Different representations of item content '''
HTML = 'html' ... |
import tempfile
import os
import re
import pandas as pd
import numpy as np
import shutil
from distutils.dir_util import copy_tree
import platform
import subprocess
import uuid
import time
from emat import Scope
from emat import SQLiteDB
from emat.model.core_files import FilesCoreModel
from emat.model.core_files.parse... |
"""This module contains utility functions making it easier to debug POMDP
planning.
TreeDebugger
************
The core debugging functionality for POMCP/POUCT search trees is incorporated
into the TreeDebugger. It is designed for ease of use during a :code:`pdb` or
:code:`ipdb` debugging session. Here is a minimal e... |
import struct
import pytest
from bronzebeard import asm
@pytest.mark.parametrize(
'rd, imm, code', [
(8, 4, 0b0000000001000000),
(8, 1020, 0b0001111111100000),
(15, 0x01*4, 0b0000000001011100),
(15, 0xff*4, 0b0001111111111100),
(8, 8, 0b0000000000100000),
(8, 12, ... |
"""
Copyright © 2018-2020 <NAME>
Licensed under the MIT license.
See «pflacs» LICENSE file for details:
https://github.com/qwilka/pflacs/blob/master/LICENSE
"""
import ast
import collections
import functools
import importlib
import inspect
import copy
import json
#import os
#import string
import pathlib
import re
impo... |
from .asf_env import get_config
from .Input import parse_wkt_util
import logging
import requests
import shapely.wkt
import shapely.ops
import re
import json
import pyproj
import geopandas
import numpy as np
import pyproj
import geopandas
from geomet import wkt, InvalidGeoJSONException
from sklearn.neighbors import Nea... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# DCASE 2022
# Task 1: low-complexity ASC with Multiple Devices
# Baseline system
# ---------------------------------------------
# Author: <NAME>
# Based on the code dcase 2020 task A baseline from Toni Heittola
# Tampere University / Audio Research Group
# Licens... |
"""NTCIR13-MedWeb"""
from typing import *
import pandas as pd
import numpy as np
import os
import sys
from pathlib import Path
import functools
from collections import Counter
from copy import deepcopy
import pickle
import click
from tqdm import tqdm
import sklearn
from sklearn import model_selection
from sklearn.mod... |
import configparser
import copy
import io
import json
import os
import pathlib
import shutil
import subprocess
import sys
import time
from shutil import copyfile
from shutil import rmtree
from statistics import stdev, mean
from typing import Optional, Any
from zipfile import ZipFile
import gspread
import yaml
from gsp... |
import collections.abc
import itertools
import warnings
import operator
from collections import namedtuple
from contextlib import suppress
from functools import wraps, reduce, partial
from itertools import chain
from operator import itemgetter
from typing import Iterable, Sized, Union, Callable, Sequence, Any, Tuple, ... |
import os
import sys
import glob
import logging
import geopandas as gpd
from os.path import join as opj
from datetime import datetime
from shapely.wkt import loads
from ost.helpers.bursts import burst_inventory, refine_burst_inventory
from ost.s1_core import search, refine, s1_dl, batch
from ost.s1_core.batch import ... |
from datapackage_pipelines.wrapper import ingest, spew
from datapackage_pipelines.utilities.resources import PROP_STREAMING
import logging, datetime
from functools import lru_cache, partial
import re
@lru_cache(maxsize=None)
def warn_once(str):
logging.warning(str)
def to_date(dt):
if isinstance(dt, datetim... |
__all__ = ['IntervalArray', 'EpochArray', 'SpaceArray']
import logging
import numpy as np
import copy
import numbers
from sys import float_info
from .. import formatters
from .. import utils
from .. import version
from ..utils_.decorators import keyword_equivalence
#################################################... |
"""
Typeclass for Player objects
Note that this object is primarily intended to
store OOC information, not game info! This
object represents the actual user (not their
character) and has NO actual precence in the
game world (this is handled by the associated
character object, so you should customize that
instead for m... |
#%%
import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
import math, copy, time
from torch.autograd import Variable
import matplotlib.pyplot as plt
def clones(module, N):
"A helper function for producing N identical layers (each with their own parameters)."
return nn.Module... |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
""" Utility for storing common lib and data structures """
import math
from collections import namedtuple
from itertools import product
import numpy as np
import simplejson as json
from numpy import random
__author__ = '<NAME> (<EMAIL>), <NAME>(<EMAIL>)'
APPS_DICT = ... |
# Copyright 2021 Fedlearn 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 agreed to in writi... |
import sys
import gc
import time
from collections import defaultdict
import numpy as np
from brian2.utils.logger import get_logger
from brian2.core.names import Nameable
from brian2.core.base import BrianObject
from brian2.core.clocks import Clock
from brian2.units.fundamentalunits import check_units, Dime... |
from scsr.models.elements import ElementAO, ElementReferenceAO
def create_element(enName,ptName,ref):
el=ElementAO()
el.add_name('en',enName)
el.add_name('pt',ptName)
el.save()# TODO: Create the ElementReference representation and code the reference adding here.
er=ElementReferenceAO.get_reference(... |
"""
High-level functions used across the CAP-Toolkit package.
"""
import h5py
import numpy as np
import pyproj
import xarray as xr
import pandas as pd
from scipy.spatial import cKDTree
from scipy.spatial.distance import cdist
from scipy import stats
from scipy.ndimage import map_coordinates
from gdalconst import *
fro... |
#!/usr/bin/python
#-*- coding: utf-8 -*-
# >.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.
# Licensed under the Apache License, Version 2.0 (the "License")
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# --- File Name: spatial_biased_modular_networks.py
# --- Creation Date: 01-02-2020
# --- ... |
# Copyright (C) 2019 TU Dresden
# Licensed under the ISC license (see LICENSE.txt)
#
# Authors: <NAME>, <NAME>, <NAME>
from mocasin.common.platform import (
FrequencyDomain,
Processor,
SchedulingPolicy,
Scheduler,
Storage,
CommunicationPhase,
Primitive,
ProcessorPowerModel,
Communic... |
# codeing=utf-8
"""Contains code for parameter-free locally accelerated conditional gradient."""
import logging
from os import system
import time
from multiprocessing import shared_memory, Value, Process, Lock
import numpy as np
from pflacg.experiments.objective_functions import RegularizedObjectiveFunction
from pf... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""ESA SNAP python (snappy) based functions."""
import math
# Import SNAP libraries
from snappy import ProductIO, GeoPos, PixelPos, HashMap, GPF, jpy, Mask
def open_prod(inpath, s3_instrument, resolution):
"""Open SNAP product.
Use snappy to open a Sentinel-3 ... |
#!/usr/bin/env python
import os
import numpy
import pyquaternion
import pcl
import tf
import rospy
import rospkg
import time
import threading
import random
import ctypes
from PIL import Image as pil
import pybullet as p
import pybullet_data
from pybullet_utils import gazebo_world_parser
from sensor_msgs.msg import Imu... |
"""
Author: <EMAIL> / <EMAIL>
Purpose: ease OCT image access and analyses
"""
import pandas as pd
import numpy as np
import os
import glob
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import plotly.graph_objects as go
class TopconSegmentationData:
# extract thickness data from ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.