text stringlengths 3.07k 22.1k |
|---|
import logging
import math
from abc import ABC
import ci_sdr
import fast_bss_eval
import torch
from espnet2.enh.loss.criterions.abs_loss import AbsEnhLoss
class TimeDomainLoss(AbsEnhLoss, ABC):
"""Base class for all time-domain Enhancement loss modules."""
@property
def name(self) -> str:
retur... |
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 27 23:43:02 2019
@author: Excalibur
"""
import numpy as np
from numpy import random
from numpy import linalg as LA
import sympy as sp
from sympy.printing import latex
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import sys
from parameterDefaul... |
from django.conf import settings
from django.contrib.auth import login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.contrib.sites.shortcuts import get_current_site
from django.db import transaction
from django.db.models import Q
from django.shortcuts ... |
from __future__ import absolute_import
import logging
import operator
from datetime import timedelta
from django.conf import settings
from django.db import transaction
from sentry.incidents.logic import create_incident, update_incident_status
from sentry.snuba.subscriptions import query_aggregation_to_snuba
from sen... |
import re
import string
import importlib
from abc import ABC, abstractmethod
from textwrap import dedent
from functools import wraps
from collections.abc import Sequence
import numpy as np
import astropy.units as u
from astropy.table import Column, QTable, Row, Table, TableAttribute
from sunpy.util.util import get_w... |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... |
from typing import Dict
from typing import List
import torch
from .. import variables
from ..bytecode_transformation import create_instruction
from ..exc import unimplemented
from ..utils import namedtuple_fields
from .base import MutableLocal
from .base import VariableTracker
class BaseListVariable(VariableTracker... |
from flask import Blueprint, render_template, redirect, flash
from flask import current_app, url_for
from flask import Response, request
from flask_user import login_required, current_user
from wtforms import SelectField, StringField
from flask_wtf import FlaskForm
from wtforms.validators import Length
import reque... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import dataset_helper
import cv2
import math
import model_transposed
import numpy as np
import sys
import datetime
def update_console(text):
sys.stdout.write("\r" + text)
sys.stdout.f... |
"""Module with functions for 'venvs' subpackage."""
from __future__ import annotations
from typing import Sequence
import platform
import subprocess
import shutil
from pathlib import Path
import sys
from typing_extensions import Literal
from mypythontools.paths import PathLike, is_path_free
from mypythontools.system... |
import argparse
import datetime
import math
import os
import time
import dotenv as de
import numpy as np
from sklearn.metrics import f1_score
de.load_dotenv()
import torch
import torch.nn as nn
from torch.utils import data
# import atom3d.util.datatypes as dt
import atom3d.shard.shard as sh
import examples.cnn3d.fe... |
"""
@package mi.dataset.driver.mflm.ctd.test.test_driver
@file marine-integrations/mi/dataset/driver/mflm/ctd/driver.py
@author <NAME>
@brief Test cases for mflm_ctd driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/dsa/test_driver
$ bin/dsa/test_driver -i [-t testname]
... |
import os, collections
import berserker
from berserker.ext import tokenization
class BERT_Tokenizer(tokenization.FullTokenizer):
def is_cleaned(self, ch):
return ch.isspace() or len(self.basic_tokenizer._clean_text(ch)) == 0
_BERT_TOKENIZER = BERT_Tokenizer(
vocab_file=os.path.join(berserker.ASSETS_P... |
"""TF lite converter for larq models."""
import tensorflow as tf
import numpy as np
import larq as lq
from larq_compute_engine import bsign, bconv2d64
from larq_compute_engine.tf.python.utils import tf_2_or_newer
from tensorflow.keras.utils import get_custom_objects
get_custom_objects()["bsign"] = bsign
quantizer_re... |
import random
import logging
import numpy as np
import math
from baseline.utils import export
__all__ = []
exporter = export(__all__)
logger = logging.getLogger('baseline')
@exporter
class DataFeed(object):
"""Data collection that, when iterated, produces an epoch of data
This class manages producing a data... |
"""
Test boilerplate for modules.
"""
import os
import time
import sys
import json
import importlib
from functools import partial
from cloudless.testutils.fixture import SetupInfo
from cloudless.util.log import logger
from cloudless.util.blueprint_test_configuration import BlueprintTestConfiguration
from cloudless.uti... |
#!/usr/bin/python
#
# Copyright (c) 2016, <NAME>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of con... |
#!/usr/bin/env python3
"""
Created on Mon Feb 11 21:25:53 2019
@author: satya
"""
#The extraction process uses the marker dots injected from the inject code
#and the image orientation is obtained from the line joining the location of the marker dots
#The location of the marker dots in the corners are identified usin... |
#! /usr/bin/env python
"""
scholar
A module for retrieving article information from Google Scholar queries
"""
# ----------------------------------------------------------------------------
# Imports
# ----------------------------------------------------------------------------
from __future__ import print_function
im... |
"""Run bcbio generated CWL with a supported tool.
Handles wrapping and integrating with multiple tools making it easier
to run bcbio in a standard way in many environments.
"""
from __future__ import print_function
import glob
import json
import os
import shutil
import subprocess
import sys
from bcbio import utils
fr... |
"""Subclass of dialog_base, which is generated by wxFormBuilder."""
import os
import re
import copy
import wx
from . import dialog_text_base
def ParseFloat(InputString, DefaultValue=0.0):
value = DefaultValue
if InputString != "":
try:
value = float(InputString)
except ValueError:... |
#space invader (ship and bullets)
import math
import random
import pygame
from pygame import mixer
#grid size
num_of_coll = 3
#margin between squares in pixels
margin = 5
#initializing pygame
pygame.init()
#init score
score_value = 0
#define fonts
font = pygame.font.Font("assets//Sportive-Regular.... |
import os
import asyncio
import logging
import synapse.exc as s_exc
import synapse.common as s_common
import synapse.lib.cell as s_cell
import synapse.lib.coro as s_coro
import synapse.lib.nexus as s_nexus
import synapse.lib.jsonstor as s_jsonstor
import synapse.lib.lmdbslab as s_lmdbslab
logger = logging.getLogger(... |
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
import sys
import io
import zipfile
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.optim import lr_scheduler
from torch.autograd import Variable
import argparse
import torchvision
from PIL import Image
... |
from data import make_matrix
import pandas as pd
import numpy as np
import os
import math
import time
import torch
import model_vsepr as net
from Criteria import MSELoss
import torch.backends.cudnn as cudnn
from argparse import ArgumentParser
from sklearn.metrics import mean_squared_error
from sklearn.model_selection i... |
import datetime as dt
import json
import os
import random
import re
from datetime import datetime, timedelta
import django
from django.core.mail import send_mail
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import get_object_or_404
from django.template.defaultfilters i... |
# -*- coding: utf-8 -*-
"""
//////////////////////////////////////////////////////////////////////////////////////////
// Original author: <NAME>
// Github: https://github.com/aritzLizoain
// My personal website: https://aritzlizoain.github.io/
// Description: CNN Image Segmentation
// Copyright 2020, <NAME>.
// Licens... |
# Import SlackerGPU to set env variables, import tf (tf 1.4)
import data_aug_uw
from handcam.ltt.util import SlackerGPU
slackerGPU = SlackerGPU.SlackerGPU(
username="ltaverne", desired_server="ait-server-03", num_gpus=0
)
import tensorflow as tf
flags = tf.app.flags
# State your dataset directory
flags.DEFINE_s... |
from discord.ext import commands
import discord
import time
import requests
import math
def Travel_overwrites(p_key,channel_permissions, roles_dict):
keys = list(p_key)
for key in keys: # keysをforで回す
try:
# まずpermissionオブジェクトを取り出す
permission = channel_permissions[key]
... |
from django.http import HttpResponseRedirect
from django.shortcuts import render, get_object_or_404, redirect
from argus.models import Scan, Host, Port, Service
from django.views import generic
from django.urls import reverse
from django.template import loader
from django.contrib.auth import authenticate, login, logout... |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 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-... |
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
"""
Class for processing FITS files processed by DECam Community Pipelines.
These pipelines will bundle entire focal planes into a single file, which can
be successfully processed by the MultiExtensionFits class, but for which we can
create better visualisations.
Note that the focusing and guiding chips are not proce... |
# this project is licensed under the WTFPLv2, see COPYING.wtfpl for details
from functools import reduce
from PyQt5.QtCore import pyqtSlot as Slot, pyqtSignal as Signal
from PyQt5.QtWidgets import QWidget, QToolBar, QMenu
from lierre.utils.db_ops import open_db, open_db_rw, UNTOUCHABLE_TAGS, get_thread_by_id
from lie... |
import numpy as np
from pygesture.pipeline import PipelineBlock
class FeatureExtractor(PipelineBlock):
def __init__(self, features, n_channels):
super(FeatureExtractor, self).__init__()
self.features = features
self.n_channels = n_channels
self.n_features = n_channels*sum(
... |
import json
import torch
from torchaudio.models.wav2vec2 import (
wav2vec2_base,
wav2vec2_large,
wav2vec2_large_lv60k,
)
from torchaudio.models.wav2vec2.utils import import_huggingface_model
from parameterized import parameterized
from torchaudio_unittest.common_utils import (
get_asset_path,
skip... |
"""repr() printing tests."""
from __future__ import annotations
import typing
import pytest
from diofant import (FF, QQ, ZZ, Abs, Catalan, Dummy, E, EulerGamma, Float,
Function, GoldenRatio, I, ImmutableMatrix, Integer,
Matrix, Rational, Symbol, Wild, WildFunction, false,
... |
import os
import pandas as pd
from pybedtools import BedTool
from io import StringIO
from abstract_feature_util import AbstractFeatureUtil
from genome_browser_client import GenomeBrowserClient
from sys_tool import find_directory
class TfUtil(AbstractFeatureUtil):
def __init__(self, reproduce_osu17=False):
... |
# Copyright (C) 2014, 2015 University of Vienna
# All rights reserved.
# BSD license.
# Author: <NAME> <<EMAIL>>
from __future__ import print_function
from itertools import combinations, product
from time import time
from benchmarks import gen_benchmark_digraphs
from grb_simplifier import iteratively_remove_runs_and_by... |
from __future__ import absolute_import
from redis_cache import get_redis_connection
import pickle
import redis
from django.conf import settings
from surround.django.utils import CacheKey
from surround.django import execution
import datetime
from redis import WatchError
from surround.django.logging import setupModuleLo... |
# ==============================================================================
# Copyright 2019 - <NAME>
#
# NOTICE: 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, ... |
import os
import time
import numpy as np
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import ray
from ray.util.sgd import TorchTrainer
from ray.util.sgd.utils import AverageMeterCollection
from ray.util.sgd.torch import TrainingOperator
import dgl
from dgl.data import RedditData... |
#!/usr/bin/env python3
import yaml
import ipaddress
import math
import boto3
import requests
import collections
import json
from ansible.module_utils.basic import AnsibleModule
from ansible.errors import AnsibleError
DOCUMENTATION = """
---
module: dns_sync.py
short_description: Synchronize DNS with Amazon/PowerDNS
... |
import pyedflib
import numpy as np
import pandas as pd
import sys
import mne
from pywt import wavedec
pathDataSet = "C:\\xampp\\htdocs\\klasifikasi\\public\\uploaded\\"
def data_load(FILE, selected_channels=[]):
fullNm = pathDataSet + FILE
f = pyedflib.EdfReader(fullNm )
n = f.signals_in_file
signal... |
# coding: utf-8
"""TV-L1 optical flow algorithm implementation.
"""
from functools import partial
import numpy as np
from scipy import ndimage as ndi
from skimage.transform import warp
from ._optical_flow_utils import coarse_to_fine
def _tvl1(reference_image, moving_image, flow0, attachment, tightness,
n... |
import datetime
import re
from django.test.testcases import TestCase
from casexml.apps.stock.models import DocDomainMapping
from casexml.apps.stock.models import StockReport, StockTransaction
from couchdbkit.exceptions import ResourceNotFound
from couchforms.models import XFormInstance
from corehq.apps.commtrack.mod... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, <NAME>. 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 Lic... |
#from POPS_lib.fileIO import read_Calibration_fromFile,read_Calibration_fromString,save_Calibration
#import fileIO
from scipy.interpolate import UnivariateSpline
import numpy as np
import pylab as plt
from io import StringIO as io
import pandas as pd
import warnings
#read_fromFile = fileIO.read_Calibration_fromFile
#r... |
# Copyright 2020-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 wri... |
# -*- coding: UTF-8 -*-
import json, time
from .game import *
from .player import *
class DotsAndBoxes:
def __init__(self, window_controller=None):
self._current_game = None
self._history = None
self._current_step = None
self._red_player = None
self._blue_player = None
... |
from torch import optim
from contextlib import contextmanager
class Trainer:
r"""Abstract base class for training models.
The Trainer class makes it incredibly simple and convinient to train,
monitor, debug and checkpoint entire Deep Learning projects.
Simply define your training loop by
implemen... |
# Copyright Contributors to the OpenCue 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 required by applicable law or... |
# Copyright 2021 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 a... |
import os
# set number of threads - this should be optimized for your compute instance
os.environ['TF_CPP_MIN_LOG_LEVEL'] = "3"
mynt="16"
os.environ["TF_NUM_INTEROP_THREADS"] = mynt
os.environ["TF_NUM_INTRAOP_THREADS"] = mynt
os.environ["ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS"] = mynt
import os.path
from os import path
... |
#!/usr/bin/python3
from os.path import isfile
from subprocess import call
import subprocess
from os import makedirs
from zkstate import ZKState
from messaging import Consumer, Producer
from ffmpegcmd import FFMpegCmd
import traceback
import time
import json
import re
from datetime import datetime, timedelta
import ra... |
import logging
import json
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller import dpset
from ryu.controller.handler import MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.exception import RyuException
from ryu.ofproto import ofproto_v1_3
from ryu.lib imp... |
from csgame.views import over
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.files.storage import default_storage
from django.db import transaction
from django.db.models.expressions import Case, F, Value, When
from users.models import CustomUser, ImageModel,... |
#
# Copyright 2017 <NAME>, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... |
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.popup import Popup
import ast
from kivy.uix.label import Label
import time
# import matplotlib.pyplot as plt
# import numpy as np
import torch as torch
import torch.nn as nn
import torch.nn.functional as F
impo... |
#!/usr/bin/env python
import requests
import numpy as np
from multiprocessing import Process, Manager, Lock
import traceback
import signal
import sys
import argparse
import json
from requests.packages.urllib3.exceptions import InsecureRequestWarning
from requests.packages.urllib3.exceptions import InsecurePlatformWarn... |
# -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
"""
- Run target skeletonization on the interaction between two point clouds.
- Compare empirical and analytic estimates for the proxy count.
"""
from functools import partial
import numpy as np
import numpy.linalg as la
import scipy.linalg.interpolative as sli # pylint: disable=no-name-in-module
import matplotl... |
# Imports
import random
import numpy as np
import time as t
import torch.nn as nn
import torch.optim as optim
import torchvision.utils as vutils
import time as time
from torch import autograd
import model
from keijzer_exogan import *
# initialize random seeds
manualSeed = 999
random.seed(manualSeed)
torch.manual_se... |
# -*- coding: utf-8 -*-
__author__ = 'fpajot'
import gzip
from io import StringIO, BytesIO
import logging
from os import path
import pickle
import boto3
import pandas
import numpy as np
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def get_keys(s3: boto3.resources.base.ServiceResour... |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2021 <NAME> (The Compiler) <<EMAIL>>
#
# This file is part of qutebrowser.
#
# qutebrowser 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... |
"""
Visualization auxiliary operations.
add_map_legend,
generate_color,
rgb,
hex_rgb,
cmap_hex_color,
get_cmap,
save_wkt
"""
from __future__ import annotations
from typing import Sequence
from branca.element import MacroElement, Template
from folium import Map
from matplotlib.cm import get_cmap as _get_cmap
from ma... |
import torch
import numpy as np
from pathlib import Path
from torch.utils.data import Dataset, DataLoader, Sampler
from torch.nn.utils.rnn import pad_sequence
import src.monitor.logger as logger
import random
#TODO: remove
BUCKET_SIZE=1
ILEN_MIN = 2
ILEN_MAX = 10000
# def _seed_worker(worker_idx):
# seed = torch... |
import pandas as pd
import re
from collections import OrderedDict
import time
#This file has various helper functions. Checkout README for the flow.
def helper_input_snt_to_tkn(snt):
step1 = []
for token in snt.split(' '):
handled = False
if '-' in token:
subkns = token.split('-')
... |
#!\usr\bin\python
# coding=utf-8
# Author: youngfeng
# Update: 07/08/2018
"""
Progressive, concluded by Sarkar et al. (ase '15), is one of the basic sampling techiques in performance prediction.
It iteratively randomly select samples from train pool to train a cart model, and test on testing pool untill the
learning ... |
from collections import defaultdict
# Open Babel
from openbabel.openbabel import OBMol, OBSmartsPattern
from openbabel.pybel import Molecule as PybelMol
# RDKit
from rdkit.Chem import Mol as RDMol
from luna.util import stringcase as case
from luna.util.exceptions import MoleculeObjectTypeError
from luna.wrappers.base... |
#!/bin/env python
import argparse, sys, os, subprocess
from pathlib import Path
import time
# python3.6 simulate.py \
# --spec swim_stats_runner.tla \
# --config swim_stats_template.cfg \
# --script tlc-nightly \
# --behaviours 100 \
# --dimension1 none \
# --output_dir test1 \
# --workers 1 \
# --members 10 \
# --de... |
r"""Encoding audio
This module illustrates how one can use recode to make audio codecs.
Make pcm encoders and decoders:
>>> encode, decode = mk_pcm_audio_codec('int16')
>>> encoded = encode([1, 2, 3])
>>> encoded
b'\x01\x00\x02\x00\x03\x00'
>>> decode(encoded)
[1, 2, 3]
Or just encode directly:
>>> encode_pcm([1, ... |
import sys
import os
from itertools import chain, combinations
from collections import defaultdict, OrderedDict
from optparse import OptionParser
import operator
def readInputFile(inputfile):
"read inputfile"
a = list()
with open(inputfile, 'r') as file_iter:
for line in file_iter:
... |
import numpy as np
import math
import re
import os
import colorsys
import pandas as pd
import itertools
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import rcParams
from scipy.optimize import curve_fit, leastsq
import seaborn as sns
#################################################################... |
import os
import sys
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
import argparse
import tensorflow as tf
import pickle
import time
import datetime as dt
from augment import apply_power_transform, power_transform_matrix, training_data_aug, traini... |
import uuid
import json
import zipfile
from io import BytesIO
from urllib.parse import urlparse
from django import forms
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.files.base import File
from django.db.transaction import atomic
from django.utils import tr... |
import torch.nn as nn
import torch.nn.functional as F
import math
from .conversions import *
from .grids import *
from .icosahedron_functions import *
from .spherical_projections import forward_gnomonic_projection, inverse_gnomonic_projection
from .util import points_in_triangle_2d
import _spherical_distortion_ext._m... |
import sys
import re
from copy import deepcopy
import numpy as np
import pandas as pd
from sklearn.cluster import MiniBatchKMeans
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit import DataStructs
import numpy.linalg as LA
from typing import Union
from .fingerprint_utils import csc_drop_zerocols
clas... |
"""
Wrapper to the code using ASE
"""
import os
try:
from ase import Atoms
import ase.io
except ModuleNotFoundError:
pass
from pygsm.coordinate_systems.delocalized_coordinates import DelocalizedInternalCoordinates
from pygsm.coordinate_systems.primitive_internals import PrimitiveInternalCoordinates
from... |
# coding: utf8
import math
def rgb_to_xyz(rgb):
"""
Convert tuple from the sRGB color space to the CIE XYZ color space.
The XYZ output is determined using D65 illuminate with a 2° observer angle.
https://en.wikipedia.org/wiki/Illuminant_D65
The conversion matrix used was provided by <NAME>:
... |
import collections
import os
import networkx as nx
from . import resolve
from . import parsepy
class NodeSet(object):
"""A strongly connected component - a set of mutually dependent files."""
def __init__(self, nodes):
self.nodes = sorted(nodes)
def __contains__(self, v):
return v in s... |
import sys
import os
import argparse
import Pyro4
import random
import logging
import torch
import numpy as np
import matplotlib.pyplot as plt
from shutil import rmtree
from pathlib import Path
from ggcnn_torch import GGCNNTorch
from utils.dataset_processing.grasp import detect_grasps
GMDATA_PATH = Path.home().joinpat... |
# -*- coding: utf-8 -*-
# Copyright 2017 <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, merge, p... |
"""
This module allows to create aliases between packages, so that one
can import a module under a different name (mainly for retrocompatibility purpose).
Note that it is NOT about aliasing local references to modules after import, eg. with "from package import module_name as other_module_name".
Here we really deal wi... |
import ipaddress
import sys
from contextlib import contextmanager
from types import SimpleNamespace
from typing import (
Any,
Awaitable,
Callable,
Dict,
Generator,
Iterable,
Optional,
Set,
cast,
)
import aiohttp
from aiohttp import (
TraceRequestEndParams,
TraceRequestExcept... |
import numpy as np
import skimage.feature as ski
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
from aniso.derivatives import apply_anisotropic_smoothing
from aniso.utils import as_ndarrays, check_2d, eigsorted
# class definitions
class StructureTensor2D(object):
""" 2D structure tensor c... |
#!/usr/bin/env python3
# --------------------------------------------------------------------------- #
# The MIT License (MIT) #
# #
# Copyright (c) 2021 <NAME> <<EMAIL>> #
# ... |
import os
import subprocess
from functools import cached_property
import chess
import chess.engine
import click
import pandas as pd
from chess.engine import _parse_uci_info
from features.abstract import Features
STOCKFISH_PATH = os.environ.get("STOCKFISH_PATH", "../Stockfish/src/stockfish")
EVAL_STOCKFISH_PATH = os.... |
import logging
from copy import deepcopy
from datetime import datetime
from decimal import Decimal
from enum import Enum
from typing import Any, Dict, Generic, List, Optional, Type, TypeVar
from pydantic import BaseModel
from pydantic.dataclasses import dataclass
from pydantic.error_wrappers import ValidationError
fro... |
# -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 <NAME>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of... |
import numpy as np
import nibabel as nib
import scipy.ndimage as ND
import uncertify.data.preprocessing.histogram_matching.KernelDensityEstimation as KDE
def ComputeHistograms(I, nbins=50, skip=50, kernel_size=50.):
my = I.min()
My = I.max()
dy = My - my
y = np.linspace(my - dy / 20., My, nbins)
h... |
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import time
from ExperienceSampling.Utility import *
class Poll(QMainWindow):
"""A Qt5 window collecting collect reports of affective experience with SAM
(Self Assessment Manikin) methodology, in reaction to programming acti... |
from __future__ import absolute_import
import datetime
from xml_models import xpath_finder
from xml_models.managers import ModelManager
from dateutil.parser import parse as date_parser
from lxml import etree
# pylint: disable=too-few-public-methods
# Fields only need one public method
from xml_models.xpath_finder im... |
from ctypes import byref, sizeof, c_uint32
from typing import Optional, List, Callable
import gc
from .vimba_object import VimbaObject
from .vimba_exception import VimbaException
from .frame import Frame
from . import vimba_c
SINGLE_FRAME = 'SingleFrame'
CONTINUOUS = 'Continuous'
def _camera_infos() -> List[vimba_... |
import os
import os.path as op
import numpy as np
import settings
from config import opts
from tfrecords.tfrecord_reader import TfrecordGenerator
import utils.util_funcs as uf
def evaluate_by_user_interaction():
options = {"data_dir_name": "kitti_raw_test",
"model_name": "vode_model",
... |
from __future__ import unicode_literals
from django import forms
from django.forms.utils import flatatt, ErrorList
from django.utils.encoding import force_unicode
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from django.db import models
from django.contrib.admin.utils ... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2016-2018 by I3py Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# ----------------... |
# -*- coding=UTF-8 -*-
# pyright: strict
from __future__ import annotations
import logging
import time
from typing import Callable, Iterator, List, Text, Tuple, Union
from .. import action, app, config, template, templates
from ..constants import RacePrediction
from ..scenes.single_mode import (
AoharuBattleConfi... |
# Copyright 2018 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 json
import threading
import time
import os
from typing import Any, Dict
from hashlib import sha256, pbkdf2_hmac
from hmac import compare_digest
from random import uniform
import botocore
import boto3
import pydgraph
from uuid import uuid4
from grapl_analyzerlib.grapl_client import MasterGraphClient
from grap... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.