text stringlengths 8.04k 46.5k |
|---|
from collections import OrderedDict
import numpy as np
import copy
from robosuite.utils.transform_utils import convert_quat
from robosuite.environments.panda import PandaEnv
from gym.envs.robotics.rotations import quat2euler, euler2quat, mat2euler, quat_mul, quat_conjugate
from robosuite.utils import transform_utils ... |
import tensorflow as tf
import tensorflow.contrib as tf_contrib
import numpy as np
from tensorflow.python.ops import rnn
from perceptual_class import Vgg16_perceptual_loss, Inception_v3_feature, Vgg16_class, Inception_v3_class
from utils import pytorch_kaiming_weight_factor
##########################################... |
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A module for creating and interacting with factory test UI."""
import collections
import functools
import html as html_module
from itertools import co... |
import numpy as np
from brainio.assemblies import DataAssembly
from brainscore import get_stimulus_set
from brainscore.benchmarks import BenchmarkBase, ceil_score
from brainscore.benchmarks.screen import place_on_screen
from brainscore.model_interface import BrainModel
from result_caching import store
BLANK_STIM_NAME... |
# Copyright 2021 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... |
import math
import logging
import pandas as pd
from datetime import datetime, timedelta
import time
import sched
import threading
import pytz
from scipy.stats.stats import pearsonr
import pickle
import inspect
import sys
from mt5_correlation.mt5 import MT5
class CorrelationStatus:
"""
The status of the monit... |
# dfa mimization
# example from https://www.tutorialspoint.com/automata_theory/dfa_minimization.htm
from collections import defaultdict
from collections import OrderedDict as od
import copy
from functools import reduce
def Pop(queue):
item = queue[0]
del queue[0]
return item
def Push(queue, item):
queue.append(i... |
#! /usr/bin/env python
# coding=utf-8
# Originally written by <NAME> <<EMAIL>>
#
# Minimally patched to make it even more xgettext compatible
# by <NAME> <<EMAIL>>
#
# 2002-11-22 <NAME> <<EMAIL>>
# Added checks that _() only contains string literals, and
# command line args are resolved to module lists, i.e. you
# can ... |
#!/usr/bin/env python
####################################################################################
### Copyright (C) 2015-2019 by ABLIFE
####################################################################################
####################################################################################
###... |
# -*- coding: utf-8 -*-
# Copyright 2021, CS GROUP - France, http://www.c-s.fr
#
# This file is part of EODAG project
# https://www.github.com/CS-SI/EODAG
#
# 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... |
#-------------------------------------------------------------------------------
# Name: Import: Nexus Buddy 2 (.nb2)
# File nb2_import.py
#
# Original Milkshape ASCII Txt Import:
# Author: <NAME>
# Email: <EMAIL>
#
# Additional changes by Deliverator
#
# Converted for Blender 2.7x by <NAME> (github.com/venetianthief)
... |
# coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import re # noqa: F401
import sys # noqa: F401
import nulltype # ... |
"""
*** OBJECTIVE
1. creating the TOPKAPI parameter file from GIS binary files (binary
grid format). -main routine 'creat_param_file'
*** COMMENT
In the present program, to write the parameter file,
generally the grid are tranformed in an array by rearranging the cell
order from the West to East and North to South,... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Module to solve Flow Free puzzles by reducing to SAT and invoking
pycosat's solver. The reduction to SAT does not automatically prevent
cycles from appearing which are disconnected from the pre-colored
cells; however, they are detected, and the solver will be run until
... |
# Copyright 2015 Ufora 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 i... |
""" Database API
- Adds a layer to the postgres API with a focus on the projects data
- Shall be used as entry point for all the queries to the database regarding projects
"""
import asyncio
import logging
import textwrap
import uuid as uuidlib
from collections import deque
from copy import deepcopy
from date... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2008-2010 ReScene.com
# Copyright (c) 2011-2015 pyReScene
#
# 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
# restrictio... |
####################################################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root for license information.
####################################################################... |
#!/usr/bin/env python
"""
Browse CIF Files, maybe run Feff
"""
import os
import sys
import time
import copy
import numpy as np
np.seterr(all='ignore')
from functools import partial
import wx
import wx.lib.scrolledpanel as scrolled
import wx.lib.agw.flatnotebook as fnb
from wx.adv import AboutBox, AboutDialogInfo
fro... |
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
'''
msppg.py Multiwii Serial Protocol Parser Generator
Copyright (C) <NAME>, <NAME>, <NAME>, <NAME>, <NAME> 2015
This program is part of Hackflight
This code is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser G... |
from astropy.cosmology import Planck15, z_at_value
import astropy.units as u
import numpy as np
import pandas as pd
import pickle
def linear_bins(z_min, z_max, n_bins):
"""Create bins linear or redshift.
Parameters
----------
z_min : `float`
Minimum redshift.
z_max : `float`
Maxi... |
"""Spherical harmonics transforms and operators
===============================================
.. autoclass:: EasySHT
:members:
:private-members:
"""
from __future__ import division, print_function
from spectratmo.planets import earth
import numpy as np
import sys
from time import time
import shtns
"""
fl... |
import psycopg2, sys, time, zlib, hashlib, uuid
from datetime import datetime
from .tools import to_str, to_bytes, DbDig, epoch
from base64 import b64encode
#import cStringIO
def cursor_generator(c):
while True:
tup = c.fetchone()
if tup is None:
break
yield tup
class UConDBEx... |
import numpy as np
from scipy.stats import norm
from copy import deepcopy
from scipy.stats import norm
import scipy.interpolate
import sys
import matplotlib.pyplot as plt
""" This script originally by <NAME>, modified by <NAME>. """
class PhotoZ_core(object):
"""Defines p(zp | z) of the core distribution (i.e. n... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import hashlib, difflib, unicodedata, logging, json
from datetime import datetime
from google.appengine.api import memcache
from google.appengine.ext import deferred
from django.db import models
from django.template.defaultfilters import slugify
from const.general impor... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
"""
{This script plots stellar mass function for red and blue galaxies from data
AND mocks and also plots correlation matrices calculated two different ways.}
"""
# Libs
from cosmo_utils.utils import work_paths as cwpaths
import matplotlib.pyplot as plt
from matplotlib import cm as cm
from matplotlib import rc
impor... |
#!/usr/bin/env python
## Copyright (c) 2019, Alliance for Open Media. All rights reserved
##
## This source code is subject to the terms of the BSD 2 Clause License and
## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
## was not distributed with this source code in the LICENSE file, you ca... |
__author__ = '<NAME> (<EMAIL>)'
import time
import json
import itertools
import datetime
import numpy as np
import scipy.sparse as spsp
from sklearn.preprocessing import normalize
import networkx as nx
from networkx.algorithms.link_analysis import pagerank_scipy
from collections import OrderedDict, defaultdict
from k... |
import discord
from discord.ext import commands
from discord.ext.commands import cooldown,BucketType
from aiohttp import request
from discord.ext.commands import MemberConverter
import aiohttp
import asyncio
import wikipedia
from howdoi import howdoi
import random
import requests
from cogs.usefullTools.info import *
im... |
import argparse
import pathlib
from skimage import io
from pointpillars.second.core import box_np_ops
from pointpillars.second.create_data import _create_reduced_point_cloud
from pointpillars.second.data.kitti_common import _extend_matrix, add_difficulty_to_annos, get_velodyne_path, \
get_image_path, get_label_pa... |
"""
python myTrain.py -dec= -bsz= -hdd= -dr= -lr=
"""
import os
from torch.autograd import Variable
from torch.optim import lr_scheduler
from torch import nn
import torch
from torch import optim
from tqdm import tqdm
import torch.nn.functional as F
import numpy as np
import random
import json
from multiwoz_mask import ... |
#!/usr/local/bin/python
"""
***********************************************
- PROGRAM: draw_features_heatmap.py
- CONTACT: <NAME>(<EMAIL>)
***********************************************
"""
print (__doc__)
import argparse
import os.path
import sys
import textwrap
import string
import re
import numpy as np
import mat... |
# sigtools - Collection of Python modules for manipulating function signatures
# Copyright (C) 2013-2021 <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, includin... |
#### PATTERN | ES | INFLECT ########################################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2012 University of Antwerp, Belgium
# Author: <NAME> <<EMAIL>>
# License: BSD (see LICENSE.txt for details).
#####################################################################... |
import os
import unittest
from collections import OrderedDict
from conans.model.profile import Profile
from conans.model.ref import ConanFileReference
from nose_parameterized import parameterized
from conans.client.profile_loader import read_profile, ProfileParser
from conans.errors import ConanException
from conans... |
import array
import torch
from torch import Tensor
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import os
from scipy.io import loadmat, savemat
from typing import Type, Any, Callable, Union, List, Optional
from lib.utils import conv3x3, conv1x1
import os.path as osp
def conv3x3(in_planes,... |
# -*- coding: utf-8 -*-
import json
import urllib
import math
# 常量
x_pi = 3.14159265358979324 * 3000.0 / 180.0
pi = 3.1415926535897932384626 # π
a = 6378245.0 # 长半轴
ee = 0.00669342162296594323 # 偏心率平方
# for example:tiles start from (3158,1173) to (3167,1182), left_bottom to right_top
# 对于每个瓦片来讲,像素点从左下角开始算
# 加密解... |
"""XuleMultiProcessing
Xule is a rule processor for XBRL (X)brl r(ULE).
DOCSKIP
See https://xbrl.us/dqc-license for license information.
See https://xbrl.us/dqc-patent for patent infringement notice.
Copyright (c) 2017 - 2021 XBRL US, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may no... |
"""dev_env_for_beta_app"""
code='dev_env_for_beta_app'
from elasticsearch import Elasticsearch
es = Elasticsearch([{'host': 'elastic-helm-elasticsearch-coordinating-only'}])
sample_user_id='607077a405164b0001e72f69'
log='https://apibeta.bighaat.com/crop/api/logerror/create-recommendation-error-log?message={}&api-versio... |
# Copyright 2016 <NAME>.
# 2016 <NAME>
# Apache 2.0
"""This module contains classes and methods common to training of
nnet3 neural networks.
"""
import argparse
import glob
import logging
import os
import math
import re
import shutil
import libs.common as common_lib
logger = logging.getLogger(__na... |
import os
os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true'
import argparse
import tensorflow as tf
import numpy as np
import scipy.io as sio
import logging
import traceback
import scipy.linalg as sl
import matplotlib.pyplot as plt
from tqdm import tqdm
from datetime import datetime
from utils import process
from util... |
# This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
import json
import os
from datetime import datetime
from django.conf import settings
from django.contrib.gis.db i... |
# -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance ... |
####################################################################################################
# Copyright (c) 2019. <NAME>, <NAME>, <NAME> #
# #
# Use of this source code is governed by a BS... |
from copy import deepcopy
from enum import Flag, auto
from itertools import count
from functools import reduce
from hoomd.util import dict_map, SafeNamespaceDict
from collections.abc import Sequence
class LoggerCategories(Flag):
"""Enum that marks all accepted logger types.
This class does not need to be use... |
# Libraries
import streamlit as st
import src.ann as ann
import src.simulation as sim
# dataset dependencies
import numpy as np
import pandas as pd
# os dependencies
from pathlib import Path
import datetime
import base64
import pickle
import glob
import re
import os
# model evaluation
from tensorflow.keras.models ... |
from __future__ import absolute_import, division, print_function, unicode_literals
import os, sys, json, io, gzip, time, socket, hashlib, uuid
import requests
from warnings import warn
from datetime import datetime, timedelta
from ipaddress import ip_network
from typing import List, Dict, Any
import boto3, botocore.s... |
#!/usr/bin/env python3
import logging
import sys
import time
from dataclasses import field
from pathlib import Path
from typing import Dict, List, Optional, Union
import numpy as np
from datasets import DatasetDict, load_dataset
from tqdm import tqdm
import flax
import jax
import jax.numpy as jnp
import librosa
impor... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
import warnings
import numpy as np
import pandas as pd
import scipy as sp
from scipy.signal import savgol_filter
from matplotlib import pyplot as plt
from .settings import *
from .plot_utils import *
__all__ = ['four_probe', 'conv_preamp', 'spec_density', 'spec_fitting', 'det2power',\
'plot_noise', 'plot_au... |
# -*- coding: utf8 -*-
# Standard library imports
from itertools import product
# PyPI library imports
import numpy as np
# Local library imports
from dmppl.math import l2Norm
from dmppl.base import dbg, info, verb, joinP, rdTxt, utf8NameToHtml
from dmppl.color import rgb1D, rgb2D
# Project imports
# NOTE: Roundab... |
"""
CLI part of the project that also wraps the calls to scikit-learn.
Some of the help texts are copied from the scikit-learn documentation
"""
from pprint import pprint
import numpy as np
from collections import defaultdict
import pandas as pd
from sklearn import preprocessing
from sklearn.decomposition import Inc... |
import numpy as np
import tensorflow as tf
import keras
from scipy import ndimage
from scipy.interpolate import Rbf
from scipy.interpolate import interp1d
import math
from tqdm import tqdm
"""
Deformation field class for data augmentation
"""
class DeformationField:
def __init__(self, shape=(540, 540)):
... |
"""
Generates a report comparing input PRS to the Genomics plc standard
"""
from datetime import datetime
from fpdf import FPDF
import os
import pandas
from .constants import REPORT_METRIC_MAPPINGS, \
SAMPLE_NUMBER_TABLE_TO_RESULTS_MAPPING_BINARY, SAMPLE_NUMBER_TABLE_TO_RESULTS_MAPPING_QUANTITATIVE, \
BINARY_M... |
"""
SR Model Class for Mlultilingual with functions for training, validation and export
Copyright: Microsoft Search, Assistance and Intelligence Team, 2020
- The main inputs required for the model are:
- Training and Validation data directory: directories with one or many text files in TSV format a... |
# Copyright (c) 2021 Food-X Technologies
#
# This file is part of foodx_devops_tools.
#
# You should have received a copy of the MIT License along with
# foodx_devops_tools. If not, see <https://opensource.org/licenses/MIT>.
"""Context sensitive views of pipeline configuration data."""
import copy
import dataclas... |
import copy
import logging
import numpy as np
from abc import ABC, abstractmethod
from collections import namedtuple
from scipy.optimize import linprog
from typing import Dict, Generator, List, Optional, Tuple, Type, Union
from dnnv.nn import OperationGraph, OperationTransformer
from dnnv.properties import Expression... |
"""
Tools to work with current data. Reuses some functions from PyFVCOM.tide.
"""
from __future__ import division
import copy
from datetime import datetime
from math import atan2
import matplotlib.pyplot as plt
import numpy as np
from PyFVCOM.grid import grid_metrics, shape_coefficients
from PyFVCOM.utilities.time... |
import math
import pkgutil
from typing import Union
from unicodedata import name
import cv2
import io
import numpy as np
from PIL import Image
import re
import time
from pyparsing import col
from pytest import Item
from d2r_image.data_models import D2Item, GroundItem, GroundItemList, ItemQuality, ItemQualityKeyword, I... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import ast
import os
import sys
from collections import defaultdict
from io import open
import gdb
import pwndbg.arguments
import pwndbg.chain
import pwndbg.color
import pwndbg.color.backtrace as B
import pwndbg.color.context as C
import pwndbg.color.memo... |
# coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
from __future__ import print_function
from cif2system import initialize_system, replication_determination, write_cif_from_system
from small_molecule_construction import add_small_molecules, include_molecule_file, read_small_molecule_file
import atomic_data
import os
import numpy as np
import datetime
import math
import... |
# <NAME>
# angstadt {at} umich.edu
# University of Virginia
#
# Python objects for manipulating MNRL files
import json
import mnrlerror
import jsonschema
import os
from networkx import drawing
import re
def loadMNRL(filename):
with open(os.path.dirname(os.path.abspath(__file__))+"/mnrl-schema.json", "r") as s:
... |
import time
import os
from collections import OrderedDict
import sys
import torch
import csv
import yaml
import re
import socket
import copy
from kge.job import Trace
from kge import Config
## EXPORTED METHODS #####################################################################
def add_dump_parsers(subparsers):
... |
import logging
import os
import numpy as np
import torch
from ignite.metrics import Average, MeanAbsoluteError, MeanSquaredError
from torch import nn
from torch.nn import functional as F
from torch.nn.utils.rnn import pad_sequence
from metrics import AP, AUCPR, AUROC, Kappa, MicroMeanAbsoluteError, MicroMeanSquaredEr... |
# -*- coding: utf-8 -*-
from typing import List, Optional, Tuple
from itertools import product
import cv2
import numpy as np
from sudoku import Corners, Field, BoundingBox
from utils import show_image
MAX_INITIAL_IMAGE_SIZE = 500
def load_image(filename: str) -> np.ndarray:
image = cv2.imread(filename)
ret... |
import logging, time, os, json, random, argparse
import numpy as np
import torch
import utils
from config import global_config as cfg
from reader import CamRest676Reader, MultiwozReader, KvretReader
from vae_model import SemiCVAE
from smc_model import SemiBootstrapSMC
# from cjsa_model import SemiNASMC
# from rl_model... |
import copy
from google.protobuf import text_format
from proto import caffe_pb2
def copy_weights(caffe_model, network):
net_param = network.net_param
for op in net_param.op:
op_name = op.name
for caffe_layer in caffe_model.layer:
if caffe_layer.name == op_name:
for ... |
# -*- coding: utf-8 -*-
"""
Personnel listings -- BPERSONNEL
================================
Author: <NAME> (<EMAIL>)
"""
import os
import logging
import copy
from bs4 import BeautifulSoup
from jinja2 import Template
from pelican import signals, contents
import yaml
import collections
from io import open
logger = l... |
import logging
import os
from paleomix.common.command import InputFile
from paleomix.common.fileutils import swap_ext
from paleomix.common.layout import Layout
from paleomix.nodes.bwa import BWAAlgorithmNode, BWAIndexNode, BWAMem2IndexNode
from paleomix.nodes.commands import FilterCollapsedBAMNode, FinalizeBAMNode
fro... |
import gym
import numpy as np
from Box2D import Box2D
from gym.envs.classic_control import rendering
from gym.spaces import Box
from gym.utils import seeding
from Box2D.b2 import (edgeShape, circleShape, fixtureDef, polygonShape, revoluteJointDef, distanceJointDef,
contactListener)
def rgb(r, g,... |
import os
import numpy as np
import tempfile
import shutil
import glob
import itertools
#import time
import json
import asyncio
import subprocess
from joblib import Parallel, delayed
from pathlib import Path
from nipype.utils.filemanip import copyfile, fname_presuffix
def run_command(command):
process = subproces... |
'''
Capsules for Object Segmentation (SegCaps)
Original Paper by <NAME> and <NAME> (https://arxiv.org/abs/1804.04241)
Code written by: <NAME>
If you use significant portions of this code or the ideas from our paper, please cite it :)
If you have any questions, please email me at <EMAIL>.
This file is used for loading ... |
from typing import *
import numpy as np
import torch
from scipy import linalg as la
from ...settings_ import settings
from ...typing_ import TensorInitArgType
from . import init
from .core import *
from .layers import *
from .linalg import *
from .nn import *
__all__ = [
'Flow', 'FeatureMappingFlow',
'Invers... |
# -*- coding: utf-8 -*-
from django.shortcuts import render, redirect
from django.views.generic import View
from django.contrib import messages
from django.template import RequestContext
from django.utils.translation import ugettext
from core.models import Contato, Ticket
from autenticacao.models import OrganizadorCont... |
import asyncio
import io
from typing import List, Union
from PIL import Image
from PIL import ImageDraw
import aoi
import discord
from cog_helpers.colors import ColorService
from discord.ext import commands
from discord.ext.commands import Greedy
from libs import conversions
from libs.converters import AoiColor, role... |
"""Run masked LM/next sentence masked_lm pre-training for BERT."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
from absl import app
from absl import flags
import numpy as np
import tensorflow.compat.v1 as tf
from REDACTED.tensorflow.compiler.... |
import os
import gzip
import glob
import random
import logging
import tempfile
import numpy as np
def fopen(filename, mode='r'):
if filename.endswith('.gz'):
return gzip.open(filename, mode)
return open(filename, mode)
def shuffle(files, exp_path, temporary=False):
""" Shuffles the contents of p... |
"""
This module is written to replace the original Swift web scraper
that produces structured subject listing information from the
MIT registrar's website.
"""
from lxml import html
import lxml.etree as etree
import requests
import re
import sys
import os
from .utils import *
# On the registrar page, all subject lis... |
from collections import OrderedDict
import hashlib
import io
from PIL import Image
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import torch
import torchvision.utils as vutils
class Logger(object):
def __init__(self, log_dir, log_name='log.txt', verbose=False):
... |
from django.shortcuts import reverse
from guardian.shortcuts import get_objects_for_user, get_users_with_perms
from django.conf import settings
from django.db.models import Q, Value
from django.db.models.functions import Replace
from django.core.exceptions import PermissionDenied
from django.core.files import File
from... |
from torch.autograd import Function
# from utils.utils import *
# from db_utils.utils import *
from query_representation.utils import *
from cardinality_estimation.dataset import to_variable
import torch
import time
import pdb
from multiprocessing import Pool
from scipy import sparse
import scipy
import numpy as np
i... |
from __future__ import print_function
import pysb.bng
import numpy
import sympy
import re
import ctypes
import csv
import scipy.interpolate
import sys
from pysundials import cvode
# Thee set of functions set up the system for annealing runs
# and provide the runner function as input to annealing
def spinner(i):
... |
import spidev
import time
import math
from gpiozero import LED
def init_spi(self):
global spi, Q_time, Q_Batt, Q_B_chg, kWh_dis, kWh_chg, cum_bp_kwh_in,\
cum_bp_kwh_out, Q_B_dis, Q_nom, SOH, R_shunt, Vt_ref, V_bat_Sum, Ai, Ai_offs,\
Tj, Tbat, bal_stat, bal_stat2, p_genrun, p_charging, p_loadshed, ... |
import os
import re
from kivy.animation import Animation
from kivy.app import App
from kivy.lang import Builder
from kivy.properties import ObjectProperty
from kivy.uix.button import Button
from kivy.uix.dropdown import DropDown
from kivy.uix.filechooser import FileChooserListView
from kivy.uix.textinput imp... |
# Copyright <NAME> <<EMAIL>>. 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 applic... |
import pytest
import numpy as np
from numpy.testing import assert_allclose
import emg3d
from emg3d import electrodes
class TestWire:
class Magnetic(electrodes.Dipole):
def __init__(self, coordinates, *args, **kwargs):
self._coordinates = coordinates
super().__init__(coordinates, ... |
# Adafruit PN532 NFC/RFID control library.
# Author: <NAME>
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2018 Adafruit Industries
#
# 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... |
"""
This module contains feature engineering computation/transformer,
All classes or functions should implement fit & transform methods.
All classes or functions should act like feature filters/selectors
All classes or functions only allow input data to be pandas
"""
# Authors: <NAME>
import numpy as np
import pandas... |
##############################################################################
#
# Copyright (c) 2015-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unti... |
# eidas_demo.py
""" EIDAS LIBRARY DEMO TO TEST ALL API FUNCTIONS """
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0,parentdir)
import time, json, threading
from eidas_bridge.eidas_bridge import eida... |
bl_info = {
'name': 'Export Aether3D model format (.ae3d)',
'author': '<NAME>',
'version': (0,6),
'blender': (2, 80, 0),
'location': 'File > Export > Aether3D',
'description': 'Exports selected meshes to the Aether3D Engine format (.ae3d)',
"wiki_url": "https://github.com/bioglaze/aether3d",... |
# coding: utf8
import torch
import numpy as np
import os
import warnings
import pandas as pd
from time import time
import logging
from torch.nn.modules.loss import _Loss
import torch.nn.functional as F
from sklearn.utils import column_or_1d
import scipy.sparse as sp
from clinicadl.tools.deep_learning.iotools import c... |
#!/usr/bin/env python
"""
Continuous backup and recoverable trash can for Git
The aim of ``git-blackhole`` is to connect any of your repositories to
a single repository ("blackhole" repository) to which you can push any
commits --- WIP commits, branches no longer needed, and useless
stashes.
There are three main fea... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import sys
# from dtw import dtw
import numpy as np
import math
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
import water.config as Config
class nconv(nn.Module):
def __ini... |
import pandas as pd
import numpy as np
import os
def read_price_data(files, name_func=None):
"""
Convenience function for reading in pricing data from csv files
Parameters
----------
files: list
List of strings refering to csv files to read data in from, first
column should be dat... |
"""
Module with functions to generate Q software inputs (PRM, LIB, PDB, FEP)
Author: <NAME>
Email: <EMAIL>
"""
import os
import math
headerPRM = '''*---------------------------------------------
* Generated with LigParGen
* William L. Jorgensen Lab
* Author: <EMAIL>
* OPLS Force Field with C... |
# 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 appli... |
#!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.autograd import Variable
from torchvision.utils import save_image
from torch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.