text stringlengths 6.04k 39.5k |
|---|
from __future__ import print_function, division, absolute_import
from core.clause import *
from core.ilp import LanguageFrame
import copy
from random import choice, random
class SymbolicEnvironment(object):
def __init__(self, background, initial_state, actions):
'''
:param language_frame
:... |
"""
Click command to do static annotation searching via Stevedore plugins.
"""
import datetime
import errno
import os
import pprint
import re
from abc import ABCMeta, abstractmethod
import six
import yaml
from stevedore import named
from code_annotations.exceptions import ConfigurationException
from code_annotations.... |
import rospy
import cv2
import numpy as np
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import Image
from skimage import img_as_ubyte
from geometry_msgs.msg import Twist
import math
import time
from Plate_Stuff import Check_For_Car, Plate_Read
x_Last = 0
Last_state = 0
check = True
Crosswalk_time ... |
#if __name__ == '__main__':
# mp.set_start_method('spawn')
# my_class = MyClass(1)
# my_class.mp_simple_method()
# my_class.wait()
import joblib
import numpy
import scipy.stats as stats
from scipy.linalg import expm
import itertools
import os
import time
from csubst import parallel
from csubst import sub... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import numpy as np
import pygimli as pg
def load(fileName, verbose=False, **kwargs):
"""Shortcut to load ERT data.
Import Data and try to assume the file format.
Additionally to unified data format we support the wide-spread res2dinv
format as w... |
# Copyright (c) 2012 OpenStack Foundation.
#
# 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... |
__author__ = 'shaylamarie'
from tkinter import * #Imports GUI packages.
import platform #Imports tools for testing user's operating system
nums = [] #List used to store calculator input as strings for later use of eval() (eval() is totally safe to use in this program since user input is highly controlled
ifFuncti... |
from qt_ex2 import camera_loop
import sys
import os
import socket
from PyQt5 import QtCore, QtWidgets, QtGui
import time
import numpy as np
"""
A basic PyQt-based GUI rendering of handtracking-based 3D file manipulation; A.K.A. N(o)H(ands)3D
"""
print(__doc__)
import sys
from PyQt5 import Qt
from vtk.qt.QVTKRenderWin... |
from django.db.models import Manager
from django.core.exceptions import ObjectDoesNotExist
import six
from rest_framework import status
from rest_framework.reverse import reverse
from rest_framework.test import APITestCase
from six import text_type
class BaseRESTAPITestCase(APITestCase):
"""Base test case class ... |
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import torchvision
from torchvision import datasets, models, transforms
import os
from config import dset_root
import random
import argparse
import copy
import logging
import sys
import time
import shutil
from tensorboardX import SummaryW... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# http://www.indigodomo.com
import indigo
import time
import re
import socket
from urlparse import urlparse
import requests
# Note the "indigo" module is automatically imported and made avail... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import copy
import numpy as np
import operator
import astropy.units as u
from astropy.time import Time
from collections import Sequence
import warn... |
import numpy as np
from sklearn import cluster, manifold, metrics
class Reservoir(object):
""" Reservoir Class
Parameters
----------
n_features: (default=1)
number of input features, set in range (>=1)
n_reservoir: (default=100)
number of reservoir neurons, set in ra... |
import os
import ast
import errno
from collections import namedtuple
import logging
import warnings
from math import factorial
import numpy as np
from scipy.optimize import curve_fit
from scipy.signal import savgol_filter, medfilt
from scipy.ndimage import gaussian_filter1d
import matplotlib.pyplot as plt
try:
f... |
import numpy as np
import scipy.spatial as spatial
import time
import math
from math import log10, floor
from scipy import interpolate
import multiprocessing as mp
import os
import sys
import subprocess
def dihedral(lis):
"""formula from Wikipedia article on "Dihedral angle"; formula was removed
from the most ... |
import warnings
import numpy as np
from nengo.exceptions import ValidationError
from nengo.params import (
BoolParam,
IntParam,
NdarrayParam,
NumberParam,
Parameter,
Unconfigurable,
FrozenObject,
)
import nengo.utils.numpy as npext
class Distribution(FrozenObject):
"""A base class fo... |
# pyOCD debugger
# Copyright (c) 2016 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# ... |
"""`plot_argus_phosphenes`, `plot_argus_simulated_phosphenes`"""
import numpy as np
import pandas as pd
from skimage.io import imread
from skimage.measure import moments as img_moments
from skimage.transform import (estimate_transform as img_transform,
warp as img_warp, SimilarityTransfor... |
#
# Author:: <NAME> <<EMAIL>>
#
# Copyright 2014, Balanced, 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 applicab... |
# *****************************************************************************
# Copyright (c) 2019, Intel Corporation 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 sou... |
#!/usr/bin/env python3
import os
import sys
import shutil
import logging
import argparse
import re
import glob
import subprocess
import yaml
import requests
from typing import Dict, List, Tuple
from parameters import *
from utils import set_or_default_version
from utils import update_service_ci_and_pom
from utils impo... |
# Author: <NAME>
# Created: 8/22/20, 3:08 PM
import logging
import argparse
import os
import seaborn
import matplotlib.pyplot as plt
import pandas as pd
from Bio import SeqIO
import logomaker as lm
from tqdm import tqdm
from typing import *
# noinspection All
import pathmagic
# noinspection PyUnresolvedReferences
... |
#!/usr/bin/env python
#########################################################################
# Authors : <NAME> (<EMAIL>)
# <NAME> (<EMAIL>)
# <NAME> (<EMAIL>)
# Modified from v0.8 of code by: <NAME> (<EMAIL>)
#
##########################################################################
# Version ... |
import sys
base_dir = "/usr/local/fworch"
sys.path.append(base_dir + '/importer')
sys.path.append(base_dir + '/importer/checkpointR8x')
import os
import json
import logging
import copy, time
import parse_network, parse_rule, parse_service, parse_user
import common, getter
nw_obj_table_names = ['hosts', 'networks', 'a... |
__author__ = '<NAME>'
__copyright__ = "Copyright 2016, AllThingsTalk"
__credits__ = []
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Prototype" # "Development", or "Production"
import logging
logger = logging.getLogger('dnn')
import tensorflow as tf
import dateutil
import numpy as np
from att_event_... |
import numpy as np
import pandas as pd
# define some static values
struct_markers = {
'cmca4':'v',
'cmca12':'^',
'c2c':'d',
'p6122':'h',
'i41amd':'*',
'pc':'.',
'c2c-12':'+',
'p63m':'x'
}
func_lines = {
'pbe':'-.',
'blyp':'--',
'vdw-df':'-'
}
struct_colors = {
'cmca4':'... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from django.shortcuts import render
from django.http import HttpResponse, Http404
from django.views.decorators.csrf import csrf_exempt
import tamil
import codecs
import sys
import copy
import math
import re
import html
import json
import random
from tamil.utf8 import get_letter... |
import numpy as np
import tensorflow as tf
from absl.flags import FLAGS
from tensorflow.keras import Model
from tensorflow.keras.layers import (
Conv2D,
Input,
LeakyReLU,
MaxPool2D,
Lambda,
concatenate,
Add,
ZeroPadding2D,
UpSampling2D,
BatchNormalization
)
from tensorflow.keras.... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
try:
from numpy import array
from numpy import isnan
from numpy import isinf
from numpy import ones
from numpy import zeros
from scipy.linalg import norm
from scipy.spars... |
from src.tools.dictionaries import MarkedDict
from src.tools.markers import AdHocMarker
from src import class_initializer, log_entry
from .. import SUPPORTED_SERVERS
main_server_strings = dict (
host_website = "https://online-go.com",
api_server = "https://online-go.com",
api_live... |
#!/usr/bin/env python
# coding: utf-8
"""
This module executes a prediction on samples from a fasta file,
the path of which should be provided as a command line argument.
The desired output folder should also be provided as an argument.
Optionally, you can either use -s/--short to skip creation of
sequence figures o... |
import bpy, struct, bmesh, operator
from mathutils import Vector
# Function to quantize normals to 15-bit precision
def quant_norm(n):
nf = n.copy()
for i in range(3):
nf[i] = int(nf[i] * 16384) / 16384.0
return nf.freeze()
# Function to quantize lightmap UVs to 15-bit precision
def quant_luv(n):
... |
"""
***UNDER CONSTRUCTION!***
The pipeline works as follows:
The repo contains three folders:
* INPUT_FILES: contains a folder for each text,
which can contain either pdf or image files.
The name of the folder should be its URI;
all files in it will receive that URI.
* TEMP: image files are copied/extrac... |
#!/usr/bin/env python
import argparse
import os
import sys
import logging
import numpy as np
import re
import time
import scipy.io
import glob
import unet
import tensorflow as tf
import keras
from keras import backend as K
import scipy.stats
import pyBigWig
print('tf-' + tf.__version__, 'keras-' + keras.__version__)
f... |
# TODO better way of storing data inside nodes.
from numpy import array,concatenate
from copy import deepcopy
from pydot import Dot,Edge,Node,Subgraph
from math import ceil
# Algorithm credits:
# http://www.cburch.com/cs/340/reading/btree/index.html
def main():
''' Do something! '''
test_remove()
### Testing an... |
import bpy
from . import operators as ydr_ops
from .shader_materials import shadermats
from ..sollumz_ui import SOLLUMZ_PT_OBJECT_PANEL, SOLLUMZ_PT_MAT_PANEL
from ..sollumz_properties import SollumType, MaterialType, LightType
from ..sollumz_ui import FlagsPanel, TimeFlagsPanel
def draw_drawable_properties(self, cont... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
__copyright__ = """
Machine Learning for Distributed Acoustic Sensing data (MLDAS)
Copyright (c) 2020, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of
any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions abou... |
# StackedSelfAttentionEncoder
import torch
import collections
import os
import pickle
from torch import nn
from torch.nn import functional as F
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from collections import defaultdict
from typing import Any, Dict, List, Optional, Sequence, Tuple, Type... |
"""
Implementation of the forest model for classification in Deep Forest.
This class is modified from:
https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/ensemble/_forest.py
"""
__all__ = ["RandomForestClassifier",
"ExtraTreesClassifier"]
import numbers
from warnings import warn
import th... |
from __future__ import print_function, unicode_literals
from ..constants import FEDORA_MINIMAL_REPOSITORY, FEDORA_MINIMAL_REPOSITORY_TAG, \
FEDORA_REPOSITORY
import subprocess
import time
from conu.backend.podman.container import PodmanRunBuilder
from conu.backend.podman.image import PodmanImagePullPolicy
from c... |
import numpy as np
import itertools as it
import re
from typing import List, Dict, Tuple, Set, AnyStr, Type
solution_list: List[Type[np.ndarray]] = []
placements: Dict[str, Dict[int, List[Type[np.ndarray]]]] = {}
def compute_blocks(line_len: int, blocks: Tuple):
"""
Given line and a tuple of blocks, generate... |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import h5py
import time
import argparse
import random
import numpy as np
import logging
import os, sys, json
impo... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import sys
import time
import os.path
import math
import re
import argparse
import traceback
import json
import bz2
import gzip
from nltk.tokenize import TweetTokenizer
from flashtext import Keywo... |
##################################################################################
# Copyright (c) 2006 <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, inc... |
"""
Copyright (c) Facebook, Inc. and its affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
"""
import sys
import numpy as np
import torch
import traceback
import pdb
from torch.nn import functional as F
from scipy.sparse.linalg import s... |
from __future__ import annotations
from typing import Iterable, Optional, cast
from operation_functions import to_ascii, upper_str
from python_script import *
from util.graph import Graph
from util.util import btos, extract_delimiter
from datetime import datetime
from code_gen_config import Config
class SqlTable:
... |
"""
ENet for image segmentation, implemented in PyTorch.
Original paper: 'ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation,'
https://arxiv.org/abs/1606.02147.
"""
__all__ = ['ENet', 'enet_cityscapes', 'ENetMixDownBlock']
import os
import torch
import torch.nn as nn
import torch... |
import os
import sys
import shutil
from mock import MagicMock
from nose.tools import assert_raises
from syn.base_utils import capture, assign, chdir, setitem
from yatr.main import _main, main, search_rootward, find_bash_completions,\
dump_bash_completions, BASH_COMPLETION_MESSAGE, USAGE, OPTION_STRINGS,\
DEFAUL... |
from concurrent import futures
import logging
import os
import json
import uuid
from datetime import datetime
import pickle
import requests
import sys
import pandas as pd
from tqdm import tqdm
import numpy as np
import time
import tarfile
import glob
from tensorflow.contrib import predictor
from google.protobuf impor... |
# 开源项目 https://github.com/jones2000/HQChart
######################################################################################
#
#
#
#####################################################################################
import sys
from umychart_complier_scanner import ErrorHandler
from umychart_complier_... |
# -*- coding: utf-8 -*-
# ======================================================================================================================
# Copyright (©) 2015-2022 LCS - Laboratoire Catalyse et Spectrochimie, Caen, France. =
# CeCILL-B FREE SOFTWARE LICENSE AGREEMENT - See ful... |
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 <NAME> <<EMAIL>>
# Copyright (C) 2014-2016 <NAME> <<EMAIL>>
# Copyright (C) 2014-2016 <NAME> <<EMAIL>>
# Copyright (C) 2014-2016 <NAME> <<EMAIL>>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public... |
import data as d
import os
import pytorch_lightning as pl
import shared
import time
import torch
import torch.nn.functional as F
from document import Hypothesis, Translation
from finetuningdataset import FinetuneDataset
from pytorch_lightning import LightningDataModule
from shared import TranslationModel, MODELS_FOLDER... |
import asyncio
import heapq
import json
import logging
import re
from cryptography.fernet import Fernet
from random import Random
from dist_zero import errors, messages, dns, settings
from .node import data, program
from .node.link.link import LinkNode
logger = logging.getLogger(__name__)
class MachineController(... |
# -*- coding: utf-8 -*-
# Copyright 2021 Google LLC. 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 require... |
import unittest
# import HTMLTestRunner
import sys
sys.path.append("..")
import ascend
import numpy as np
import cv2
import os
def decode(heatmap, scale, offset, landmark, size, thresh=0.1):
heatmap = np.squeeze(heatmap[0])
scale0, scale1 = scale[0, 0, :, :], scale[0, 1, :, :]
offset0, offs... |
"""
pybufrkit.tables
~~~~~~~~~~~~~~~~
The Table Cache makes sure tables of the same version only get loaded from
disk once. When the get_table_group method is called, it returned a
group of table either from the cache or loaded from disk if they are not
available in the cache yet (and save them to the cache for future... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 23 15:04:32 2018
@author: maximoskaliakatsos-papakostas
"""
from collections import Counter
import sys
import os
cwd = os.getcwd()
import glob
import CM_TR_TrainingPiece_class as tpc
import numpy as np
import scipy.stats as scp
impo... |
import keras
import keras.callbacks as callbacks
import numpy as np
from keras.callbacks import Callback, ModelCheckpoint, ReduceLROnPlateau
from keras.layers import (
Activation,
Add,
BatchNormalization,
Concatenate,
Conv2D,
Conv2DTranspose,
Dense,
Dropout,
GlobalAveragePooling2D,
... |
from collections import Callable
from copy import deepcopy
from io import StringIO
import sys
import h5py
import numpy as np
from .data import ATOMIC_SYMBOL, EV_PER_MEV
from .endf import get_cont_record, get_list_record, Evaluation
from .function import Function1D, Tabulated1D, Polynomial, Sum
import openmc.checkvalu... |
import colorsys
import json
import pathlib
import random
import string
from io import BytesIO
from typing import Optional, Union
import disnake
import rapidfuzz
from disnake.ext import commands
from PIL import Image, ImageColor
from monty.bot import Bot
from monty.utils.extensions import invoke_help_command
THUMBNA... |
#!/usr/bin/python
# Copyright (c) 2017, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... |
import pickle
import os
import math
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from CarDetector import CarDetector
class AnalyseResults:
def __init__(self,dirChasing):
self.dirChasing = dirChasing
def loadPositionHistory(self, fileName):
return pic... |
#!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... |
import re
from abc import ABCMeta, abstractmethod
import attr
import sympy
from sympy import Piecewise
from sympy.core.cache import cacheit as sympy_cacheit
from ._attrs import immutable_attribs
__all__ = [
'IdxSym',
'IntIndex',
'FockIndex',
'StrLabel',
'FockLabel',
'SpinIndex',
'IndexOv... |
# -*- coding: utf-8 -*-
"""
Curriculum clustering algorithm
When teaching a particular concept, it can be useful to break down the learning into lessons of increasing complexity.
Consider a curriculum, of various subsets of difficulty, for machine learning. Instead of presenting samples
in random order, imagine starti... |
import time
from ops import *
from utils import *
import numpy as np
import tqdm
from scipy.ndimage import rotate as rot
import pickle
def custom_rot(img, angle, reshape=False):
_rot = rot(img, angle, reshape=reshape)
mx, mn = 1, 0
return (_rot - mn)/(mx - mn)
class ResNet(object):
def __init__(self, sess, ... |
import pygame
import random
import math
pygame.mixer.init()
pygame.init()
#背景圖bg1範圍
def upclear_bg1(x,y):
canMove = True
if m_top_leftwall_bg1 <= x <= m_top_rightwall_bg1 and y-50 < topwall_bg1:
canMove = True
elif y - 1<topwall_bg1:
canMove = False
elif(x < leftwall_bg1 or x > righ... |
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
i... |
#!/usr/bin/python
#-*- coding: utf-8 -*-
# Copyright 2020 Sogang University Auditory Intelligence Laboratory (Author: <NAME>)
#
# MIT License
import os
import sys
import argparse
import soundfile
import speechpy
import librosa
import data_utils
import numpy as np
import torch
import torch.nn.functional as F
import ... |
import os
import numpy as np
from PIL import Image
import torch
from torch import nn
import torch.nn.init as initer
class AverageMeter(object):
"""Computes and stores the average and current value"""
def __init__(self):
self.reset()
def reset(self):
self.val = 0
self.avg = 0
... |
import time
import warnings
from copy import deepcopy
from typing import Optional, List, Tuple, Dict
import numpy as np
import pandas as pd
from ConfigSpace import Configuration
from IPython.display import JSON
from sklearn.pipeline import Pipeline
from xautoml._helper import XAutoMLManager
from xautoml.config_simila... |
from .helpers import (update_mapping, proc_mapping, get_reverse_mapping)
import numpy as np
from joblib import Parallel, delayed
from sklearn.utils.validation import check_memory
from sklearn.base import clone
from .ScopeObjs import ScopeTransformer
from operator import itemgetter
from .base import _get_est_trans_param... |
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division, print_function
import numpy as np
from ..util.event import EmitterGroup, Event, WarningEmitter
from ..util.ptime import time
from ..ext.six ... |
# Copyright 2018 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
import os
import sys
import time
import tracemalloc
import re
import warnings
import argparse
import pickle
import numpy as np
import pandas as pd
from sklearn import __version__
sklearn_ver = __version__
from sklearn import model_selection
from sklearn.linear_model import SGDClassifier
from sklearn.preprocessing imp... |
#!/usr/bin/env python3
__all__ = [
"ApproximateGPModel",
"RunApproximateGP"
]
from random import seed
from gpytorch.distributions import MultivariateNormal
from gpytorch.means import ConstantMean
from gpytorch.mlls import (
GammaRobustVariationalELBO,
PredictiveLogLikelihood,
VariationalELBO
)
fr... |
import os
try:
import string
except:
print("Fatal Error String Not Found")
import encDict
import sys
try:
import base64
except:
print("Fatal Error Base64 Not Found")
'''
dictionary is imported form encDeict.py
'''
dict1 = encDict.dict1
dict2 = encDict.dict2
dict3 = encDict.dict3
dict... |
# Python Imports
import uuid
import os
import json
import time
import re
import numpy as np
now = time.time # shortcut
# Twisted Imports
from twisted.internet import defer, threads, task
from twisted.python import log
from twisted.python.filepath import FilePath
# Octopus Imports
from octopus.sequence.error import A... |
#!/usr/bin/python3
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint
# Table of constants from Karakas and Tariq (1988).
# Takes inputs in degrees instead of radians just to look cool, I guess.
kt_table = {
0: [ 0.25, -2.091, 0.0453, 5.1313, 1.8672, 1.6*(10**-1), 2.675 ],
360: [ 0... |
# system
from __future__ import print_function
# python lib
from copy import deepcopy
# tf_render
import tensorflow as tf
# self
"""
numpy or tensor
"""
class RotationMtxBatch(object):
"""
0. batch
1. broadcast support
"""
def __init__(self, **rotation_param):
# Normalize [batch_size, d... |
# -*- coding: utf-8 -*-
"""Reads .bsf file (version 105) from AMTI NetForce software.
This module reads .bsf file (version 105) from AMTI NetForce software and
extracts the file metadata and data from force platforms.
The typical use of this module is, for example:
from AMTIbsf import loadbsf
... |
"""Renewable Energy Module.
Classes in this module are responsible for creating/managing/consuming both the renewable and the fossil energies.
"""
import csv
import numpy as np
from constants import *
from helpers import SaatliMaarifTakvimi, SHC
class SolarEnergy:
"""This class represents a solar energy source... |
# coding=utf-8
from __future__ import print_function
import codecs
import datetime
import os
import subprocess
import sys
import webbrowser
import logger
RES_DIR = "src/main/resources/l10n"
STATUS_FILE = "status.md"
def get_current_branch():
"""
:return: string: the current git branch
"""
return sub... |
# coding: utf-8
"""
Implements support for BLF (Binary Logging Format) which is a proprietary
CAN log format from Vector Informatik GmbH (Germany).
No official specification of the binary logging format is available.
This implementation is based on Toby Lorenz' C++ library "Vector BLF" which is
licensed under GPLv3. ... |
#!/usr/bin/env python3
"""Set of transforms related to keypoints."""
__all__ = ['DenseMapsMobilePose', 'BoxPoints2D']
import itertools
from dataclasses import dataclass
from simple_parsing import Serializable
from typing import Union, Tuple, Dict, Hashable
import numpy as np
import torch as th
import torch.nn as nn
... |
#!/Users/rohan/opt/anaconda3/bin/python
import numpy as np
import pandas as pd
import pickle
from pathlib import Path
import sys
import os
import datetime
# handeling deprecated warnings
import warnings
warnings.filterwarnings("ignore", category=UserWarning)
def init_report():
'''
This will check if re... |
import os
import re
import subprocess
import sys
import tempfile
import warnings
from collections.abc import Callable
from contextlib import AbstractContextManager, closing
from datetime import datetime
from hashlib import sha256
from importlib.metadata import PackageNotFoundError, distribution
from importlib.util impo... |
#! /usr/bin/env python3
# Copyright 2019 Samsung Research America
#
# 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 app... |
import discord
from discord.ext import commands, menus
from motor.motor_asyncio import AsyncIOMotorClient
from utils.menuUtils import MenuButtons
from main import config_var
import os
from PIL import Image, ImageDraw, ImageFont
import io
cluster = AsyncIOMotorClient(config_var['mango_link'])
db = cluster["levelling"]
... |
#!/usr/bin/env python
'''
Creates JetYak Class which contains various sensors, and allows for operations between sensors.
Maintainer: vpreston-at-{whoi, mit}-dot-edu
'''
import parseyak.sensors
import pandas as pd
import numpy as np
import copy
import utm
from gasex import sol
import time
class JetYak(object):
... |
#!/usr/bin/python3
import datetime
import math
import os
import shutil
import sys
import time
from typing import List, Union
import numpy as np
from opensfm import geo
try:
# pyre-fixme[21]: Could not find module `pyexiv2`.
import pyexiv2
# pyre-fixme[21]: Could not find module `pyexiv2.utils`.
fro... |
import logging
import voluptuous as vol
import json
from datetime import timedelta
import time
from homeassistant.components import sensor
from custom_components.smartthinq import (
DOMAIN, LGE_DEVICES, LGEDevice)
import homeassistant.helpers.config_validation as cv
from homeassistant.const import (
ATTR_ENTITY_I... |
from __future__ import absolute_import, division, print_function
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed w... |
'''Flexible classes to build and train a variety of autoencoder architectures.
New autoencoder architectures can be implemented easily by inheriting from the
AbstractAutoencoder class.
# Autoencoder architectures
Autoencoder: one hidden layer
DeepAutoencoder: n hidden layers
MultimodalAutoencoder: m input... |
# Copyright (c) OpenMMLab. All rights reserved.
import math
from typing import Dict, Optional, Sequence, Union
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import ConvModule
from mmcv.runner import BaseModule
from mmflow.ops import build_operators
from ..builder ... |
import logging
import random
import threading
from copy import deepcopy
from cvv.vtypes import Version, VersionSet, VersionVector
__all__ = ['Replica',
'NoSuchKeyException',
'DuplicateKeyException',
'ConcurrentUpdateException',
'ReadTuple']
class NoSuchKeyException(Excep... |
# Picomotor Control v1.0
author = '__pacosalces__'
import telnetlib
import time
CR = b"\n"
LF = b"\r"
def telnet_8742(command):
""" Assemble raw commands for 8742
picomotor controller and iterface to telnet
server """
def wrapped(func):
def telnet_interface(self, *args, **kwa... |
# Copyright 2015 <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, softw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.