text
stringlengths
3.07k
22.1k
import argparse import os.path as osp import logging from mpi4py import MPI from tqdm import tqdm import numpy as np import gym from baselines.mediator import generator, mediator, learner from baselines.common import set_global_seeds, tf_util as U from baselines.common.misc_util import boolean_flag from baselines imp...
from unittest import TestCase import os import numpy as np from bladex import NacaProfile, Shaft, Propeller, Blade from smithers.io.obj import ObjHandler from smithers.io.stlhandler import STLHandler def create_sample_blade_NACApptc(): sections = np.asarray([NacaProfile('5407') for i in range(13)]) radii=np.a...
"""support to generate SQLObject-based fixtures.""" from fixture.style import camel_to_under from fixture import SQLObjectFixture from fixture.command.generate import ( DataHandler, FixtureSet, register_handler, code_str, UnsupportedHandler, MisconfiguredHandler, NoData ) try: import sqlobje...
from sys import argv import numpy as np import scipy as sp from scipy.linalg import eig,svd,eigh from scipy.sparse.linalg import eigs from sklearn.neighbors import kneighbors_graph from copy import deepcopy from .utils import * from pymanopt.manifolds import Grassmann import nudged from sklearn.metrics.pairwise import ...
import os import sys import argparse import logging import yaml from typing import List import copy import random from dataclasses import dataclass from tqdm import tqdm import numpy as np import torch from torch import nn from torch.utils.data import DataLoader from poutyne.framework import Model from sklearn.neu...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Pixel Starships Market API # ----- Packages ------------------------------------------------------ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse imp...
#!/usr/bin/env python3 """ script for clustering genomes based on average nucleotide identity """ import os import sys import argparse import subprocess from networkx import Graph as Graph from networkx import connected_components as connected_components # ctb from ctbBio.fasta import iterate_fasta as parse_fasta de...
# COPY PASTED FROM ansible 2.6 using BSD license # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, an...
from typing import ( Dict, Tuple, ) import logging import toposort from haoda import ir, util from haoda.ir.arithmetic import base _logger = logging.getLogger().getChild(__name__) GRAMMAR = r''' SodaProgram: ( ('border' ':' border=BorderStrategies)? ('burst' 'width' ':' burst_width=INT) ('cluster' ':...
# Runge-Kutta Driver for quaternions-described object orientation # Import other packages used import numpy as np # Import constants and parameters used from Parameters_and_Constants import pi, moi # Dual Matrix to a vector # Inputs: # - 3D array ( vec[ 3 ] ) # Outputs: # - 3x3 matrix ( dvec ) which is its dual for ...
"""Test for certbot_apache.configurator for CentOS 6 overrides""" import os import unittest from certbot_apache import obj from certbot_apache import override_centos from certbot_apache import parser from certbot_apache.tests import util from certbot.errors import MisconfigurationError def get_vh_truth(temp_dir, conf...
from Functions.General_Functions import isNaN, getNContext, pad_array, candidateClsf, filterNumbers, filterNumbers_MaintainDistances from Method_Handler import MethodHandler import nltk import math import sklearn as sk import numpy as np import pandas as pd import statistics as stats import os from tempfile import mkdt...
import boto3 import json from base64 import b64decode from dynamodb_json import json_util import numpy as np from decimal import * from collections import OrderedDict iot_data = boto3.client('iot-data') dedup_table_name='dedup-table' counts_table_name='counts-table' dealer_hand_table='dealer-hand' region = 'us-east-1...
from typing import TYPE_CHECKING from asgiref.sync import sync_to_async import click from playthrough.models import Game, Alias, Series, RoleTemplate from rosetta.utils import ask from .utils import games_list_to_embed, game_to_embed if TYPE_CHECKING: from typing import Union, Tuple from click import Context...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # # 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/LICEN...
# Copyright 2021 The NATS Authors # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# -*- coding:utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import time from deeploader.util.fileutil import read_lines, makedirs from deeploader.util.opencv import * from torch.utils import data from tqdm import tqdm from dataset im...
import pandas as pd from tqdm import tqdm from sympy import sympify from hanspell import spell_checker import ast import json import re import numpy as np from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, recall_score, precision_score, f1_score import torch from transform...
import matplotlib.pyplot as plt import numpy as np import pathlib import f16 import casadi as ca import pytest from casadi.tools.graph import graph import os TRIM_TOL = 1e-5 def plot_table2D(title, path, x_grid, y_grid, x_label, y_label, f_table): X, Y = np.meshgrid(x_grid, y_grid) Z = np.zeros((len(x_grid)...
import torch import torch.optim as optim from torch.optim.lr_scheduler import ReduceLROnPlateau, StepLR import numpy as np import pandas as pd from collections import Counter import time, os, platform, sys, re import torch.backends.cudnn as cudnn def metric(probability, truth, threshold=0.5, reduction='none'): ''...
import torch import torch.nn as nn from torch.utils.data import DataLoader from dataset import pll_datst, coll, mono_datst from preprocessing import load_data, tokenizer from model2 import xlmb2b from tqdm import tqdm from os import path from functools import partial from nltk.translate.bleu_score import corpus_bleu im...
#!/usr/bin/env python import rospy import sys import time import numpy as np from numpy import linalg as LA import random from realtimepseudoAstar import plan from globaltorobotcoords import transform from std_msgs.msg import String from nubot_common.msg import ActionCmd, VelCmd, OminiVisionInfo, BallInfo, ObstaclesInf...
# -*- coding: utf-8 -*- from app.linuxweb.common import * import base64,psutil def index(): # send_websocket(data={"nickname": "kcw-linux控制板", "icon": "", "text": "输入内容..."}) send_websocket(data={"nickname":"系统","icon":"http://img.kwebapp.cn/icon/git.png","text":"git pull执行成功,返回结果是:“已经是最新的”","code":1}) # fi...
############################ # Imports ############################ import os from pathlib import Path import argparse import torch import torch.utils.data import numpy as np from torch import nn, optim from torch.nn import functional as F from torch.nn import DataParallel from torchvision import datasets, transforms ...
import asyncio from enum import Enum import logging import socket from collections import defaultdict import ipaddress import time from datetime import datetime import aiopg from sqlalchemy.dialects import postgresql as pg import sqlalchemy as sa import psycopg2 from .proto.packet import Packet from .proto.opttypes i...
#!/usr/bin/python3.9 # Copyright (c) 2021 MobileCoin Inc. # Copyright (c) 2021 The Forest Team import argparse import asyncio import json import logging import os import shutil import socket import sys import time from io import BytesIO from pathlib import Path from tarfile import TarFile from typing import Any, Calla...
# Generate the documentation. # Imports # ------------------------------------------------------------------------------------------------- from functools import lru_cache import itertools import json from pathlib import Path import os from pprint import pprint import re import sys from textwrap import indent from t...
# -*- coding: utf-8 -*- '''Copyright (C) 2013, 2020 <NAME> <<EMAIL>> Licensed under the Apache License, Version 2.0''' #--------------------------------------------------------------------------------------------------------- import time as _time import sys; sys.modules['racslib.mytime'] = sys.modules[__name__] #def ...
import re from omgfm import ast_tools from omgfm import _wrapper_cmark_gfm as _cmark def get_headings(document): """Find all the headings in *document* and capture data from them. Contains an inner function that iterates over any found heading node to extract any text content. Args: docum...
import ast import csv import sys import math import os from sklearn.tree import DecisionTreeClassifier from sklearn import datasets from IPython.display import Image from sklearn import tree import pydotplus def load_csv_to_header_data(filename): path = os.path.normpath(os.getcwd() + filename) fs = csv.rea...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
import json from os.path import exists import numpy as np from sklearn.linear_model import Ridge from sklearn.metrics import make_scorer from sklearn.model_selection import GridSearchCV, KFold from scipy.stats import rankdata, zscore from scipy.spatial.distance import cdist from gifti_io import read_gifti, write_gifti ...
import ntpath import os import argparse from datetime import datetime import logging from pypgrest import Postgrest import pandas as pd import boto3 from dotenv import load_dotenv import utils # Envrioment variables AWS_ACCESS_ID = os.getenv("AWS_ACCESS_ID") AWS_PASS = os.getenv("AWS_PASS") BUCKET_NAME = os.getenv(...
#!/usr/bin/env python # Copyright 2018 <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 agre...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module contains the models used in the mobile segmentation evaluation suite. The classes defined here only contain structural information and mapping to XML representation. Operations on those structures are defined in separate packages ("processing", in particular...
# -*- coding: utf-8 -*- # # This file is part of RPIO. # # Copyright # # Copyright (C) 2013 <NAME> <<EMAIL>> # # License # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, ...
from sqlalchemy import Column, String, Integer, Float, Date, Boolean, create_engine, PrimaryKeyConstraint from sqlalchemy.ext.declarative import declarative_base from dotenv import load_dotenv import os Base = declarative_base() class NewHouseByArea(Base): '''--新房成交信息,按面积划分的信息''' __tablename__ = 'newhousebya...
""" dict_sbmat module Helper functions to deal with sparse block matrices using a dictionary with index tuples as keys. This is beneficial e.g. in assembling coupled circuit/FEM systems in the matrix level. E.g. if you have sparse matrices A B C D and you want to create a sparse block matrix like [[A, 0, 0], [0, B, ...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
from itertools import chain from django.db import models from django.conf import settings from django.core.exceptions import ValidationError from django.db import transaction from api.utils import generate_slug, generate_slugs_batch DEFAULT_ACCOUNTS = ( # type curr contra operating number name tag ('as...
# -*- coding: utf-8 -*- from scipy.spatial.distance import pdist, squareform from local_search.intra_route_operators import do_3opt_move # this is just to get pretty pictures out of 3-opt moves SHOW_DEBUG_GRAPHVIZ_VISUALIZATIONS = True import sys import itertools from shutil import copyfile sys.path.append(r'C:\User...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Python from __future__ import print_function, with_statement, unicode_literals import argparse import difflib import errno import os import sys import xml.etree.ElementTree as ET __version__ = '0.1.4' def get_streaming_xml_path(): if sys.platform == 'darwin': ...
from enum import Enum import gzip import json import os from shutil import copyfile, copyfileobj, move, rmtree import tempfile import pandas as pd from six import itervalues from .compat import pathlib from .const import TargetType from .core import (decode_node, encode_node, find_object_hashes, hash_contents, ...
import sys import os import subprocess import getpass import yt_dlp from ui.ui_MainWindow import Ui_MainWindow from about import About from hurry.filesize import size, si from PySide6.QtCore import ( QSettings, QSize, QPoint, QLibraryInfo, QLocale, QTranslator, QThread, ...
#!/usr/bin/env python # The dialogue manager in the local recovery strategy from __future__ import print_function, division import pickle import numpy as np from threading import Thread, Lock import rospy import actionlib from rail_sound_interface import SoundClient from task_executor.actions import get_default_ac...
import os import urllib.request , urllib.parse, urllib.error import json from datetime import datetime import time import psycopg2 from os import environ #################################################################################################### ################# Utility function to obtain time in requi...
''' Created on 04-Feb-2017 @author: vijay ''' import wx.adv from wx.adv import Wizard from wx.adv import WizardPage, WizardPageSimple from src.view.connection.DatabaseNavigation import DatabaseNavigationTree from src.sqlite_executer.ConnectExecuteSqlite import ManageSqliteDatabase, \ SQLExecuter from sqlite3 impo...
from __future__ import print_function import subprocess import shutil import os import sys import platform import tempfile sys.dont_write_bytecode = True PL_LINUX = 'manylinux1_x86_64' PL_MACOS = 'macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64' PL_WIN = 'win_amd64' c...
import time import random import re import smtplib import mail from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from email.mime.text import MIMEText from email.utils import formataddr from selenium impor...
import os os.environ["OMP_NUM_THREADS"] = "1" os.environ["OPENBLAS_NUM_THREADS"] = "1" os.environ["MKL_NUM_THREADS"] = "1" os.environ["VECLIB_MAXIMUM_THREADS"] = "1" os.environ["NUMEXPR_NUM_THREADS"] = "1" import copy import logging import pandas as pd import multiprocessing as mp from ..orbit import TestOrbit from ...
import functools from typing import Callable, List, Optional import click from globus_cli.parsing.command_state import ( debug_option, format_option, map_http_status_option, verbose_option, ) def common_options( f: Optional[Callable] = None, *, disable_options: Optional[List[str]] = None ) -> Ca...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "<NAME>" import logging import os import urllib import sys import re from google.appengine.ext import webapp from controller.utils import template from google.appengine.ext.webapp import util from google.appengine.api import users from google....
import os import boto3 from botocore.config import Config import datetime as dt import json import csv import numpy as np import zipfile from boto3.dynamodb.conditions import Attr import pickle # mitigation of potential API rate restrictions (esp for Batch API) retry_config = Config(retries={"max_attempts": 5}) client...
# -*- coding: utf-8 -*- from __future__ import absolute_import import numpy as np import keras.backend as K from keras import activations, initializers, regularizers from keras.engine import Layer, InputSpec from keras.layers.recurrent import Recurrent, time_distributed_dense from keras.layers.core import Flat...
import sys import pdb import pickle as pkl import torch import torch.nn as nn import torch.nn.functional as F import dgl import dgl.data import numpy as np import networkx as nx import scipy import scipy.sparse as sp from scipy.sparse import csr_matrix from ogb.nodeproppred import DglNodePropPredDataset def _load_da...
from .static.Qua_config import * from .Qua_assisFunc import * import pandas as pd import numpy as np from .main_match import main_match # function 1 def GetAllIdType(StudentList): StudentList = pd.DataFrame(StudentList[1:], columns=StudentList[0]) id_col_name = ['身分別1','身分別2','身分別3','特殊身份別'] column ...
# -*- coding: utf-8 -*- # # Copyright 2016 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 requir...
''' script for loki gui includes function to handle pre-, post- processing of loki and zoomie processing created by: <NAME> ''' import tkinter as tk from tkinter import ttk from data_prep_func import * from data_export_func import * def date_time_gui (): win = tk.Tk() win.title('LOKI powered by Python') # wi...
from django.shortcuts import render, redirect from django.http import HttpResponse, Http404, HttpResponseRedirect import datetime as dt from .models import Image, Comment, Profile, Contact, Like from .forms import * from .email import send_welcome_email from django.contrib.auth.decorators import login_required from dja...
from abc import ABCMeta, abstractmethod from ctypes import c_void_p, c_char_p, c_int, c_double, byref from .pyfluid import pyfluid as lib from . import pybindings as pb from . import method_decorators as decorators from .vector3 import Vector3, Vector3_t from .aabb import AABB, AABB_t class FluidSource: __metacla...
import re from django.db.models.query import QuerySet from django.utils.text import slugify from django.conf import settings from trello import TrelloClient, Card from trello.exceptions import ResourceUnavailable from guardian.shortcuts import ( get_objects_for_user, get_perms_for_model) from data_driven_a...
from collections import defaultdict import sys from wx.lib.pubsub import setupkwargs from wx.lib.pubsub import pub import wx import wx.lib.mixins.listctrl as listmix import os class CandidateObj(object): def __init__(self,name,id=0): self.name=name self.id=id class WrightModel(): def __init_...
''' Created on Feb 13, 2012 @author: fmertens ''' import numpy as np import nputils import imgutils import wavelets def get_wavelet_obj(w): if isinstance(w, str): return wavelets.get_wavelet(w) if isinstance(w, wavelets.WaveletBase): return w raise ValueError("w is not a correct wavelet...
# -*- coding: utf-8 -*- """ Created on Fri Aug 15 22:18:57 2014 Modified on Wed Jan 27 15:36:00 2016 @author: <NAME> """ from serie2QMlib import * import numpy as np import matplotlib.pyplot as plt import pandas as pd from mpl_toolkits.axes_grid1 import make_axes_locatable #Define sliding window def window_time_serie...
"""Module with classes to compute, read and store classification results. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv from io import BytesIO from io import StringIO import logging import os import pickle import time from six import iterit...
import os import re import sys import json from functools import wraps from collections import defaultdict from typing import Iterable, Optional, Callable, Union, NamedTuple, Set import nonebot, logging from nonebot import logger from nonebot.command import _FinishException, _PauseException, SwitchException from . im...
from typing import Dict, List, Any, Optional from .aggregating import Aggregating, aggregating from typing import Callable, Mapping, Iterator import numpy as np from tqdm import tqdm import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from operation import DatasetOperati...
# -*- coding: utf-8 -*- """ gdcdatamodel.gdc_postgres_admin ---------------------------------- Module for stateful management of a GDC PostgreSQL installation. """ import argparse import logging import random import time import sqlalchemy as sa from psqlgraph.base import ORMBase from sqlalchemy import create_engine ...
import os.path import json import logging import platform from urllib.error import HTTPError, URLError from urllib.request import Request, urlopen from mc_launcher_core.exceptions import InvalidLoginError, InvalidMinecraftVersionError from mc_launcher_core.web.install import save_minecraft_jar, save_minecraft_lib, save...
from django.shortcuts import render_to_response, HttpResponseRedirect, HttpResponse, Http404, RequestContext, loader from django.template.context_processors import csrf from django.contrib import auth from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.contr...
import unittest class Empty(Exception): pass class _DoublyLinkedBase(object): """A base class providing a doubly linked list representation.""" class _Node: """Lightweight, nonpublic class for storing a doubly linked node.""" __slots__ = '_element', '_prev', '_next' # streamline memory...
""" ConfD services """ __author__ = "<NAME> <<EMAIL>>" import re import collections from unicon.bases.routers.services import BaseService from unicon.core.errors import SubCommandFailure, StateMachineError from unicon.eal.dialogs import Dialog, Statement from unicon.plugins.generic import service_implementation as...
''' Script to generate embeddings from resnet trained using pcl Command to run: python eval_kmeans.py --pretrained experiment_pcl_resume/checkpoint.pth.tar /home/mprabhud/dataset/shapenet_renders/npys/ ''' from __future__ import print_function import os import sys import time import torch import torch.nn as nn impo...
# -*- coding: utf-8 -*- import datetime import json import os import time import numpy as np import torch from dwi_ml.data.dataset.data_list import (DataListForTorch, LazyDataListForTorch) from dwi_ml.experiment.timer import Timer from dwi_ml.experiment.monitoring import Val...
import json import os import shutil import warnings from typing import List, Tuple from sklearn.model_selection import train_test_split def read_json(fp: str) -> dict: """Helper. Reads a JSON file and returns content. :param fp: The filepath to the JSON file. :dtype fp: str """ with open(fp) as ...
"""Setup for signac, signac-flow, signac-dashboard for this study.""" import os import pathlib import sys import flow import numpy as np from flow import environments # from reproducibility_project.src.analysis.equilibration import is_equilibrated class Project(flow.FlowProject): """Subclass of FlowProject to p...
#!/usr/bin/python2.6 # Copyright (c) 2011 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. """Refresh online Portage package status spreadsheet.""" import optparse import os import shutil from chromite.lib import cros_...
"""Wrapper code for using commonly-used layers.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np from basenji import ops def exp_function(length, decay_constant=0.05): """ """ X = np.zeros((length, length...
# -*- coding: utf-8 -*- # ''' Epidemiological models used for fitting/analyzing data. Derived classes have increasing ability to handle variable parameters which may be optimized. At this point, most capable is class ̀SEIRYOpt3`. ''' __author__ = '<NAME>' __license__ = 'MIT License' __version__ = '1.1' import ma...
import os import random import numpy as np import argparse import itertools from models.resnet18_classifier import Resnet_classifier import torch from torch import nn, optim from torch.utils.data import DataLoader from torchvision import datasets, transforms import torch.backends.cudnn as cudnn from utils.dataLoader i...
################################################################################ # The Sandbox Libraries (Python) Test Suite # # # # Copyright (C) 2004-2009, 2011-2013 <NAME>, <EMAIL> # # All rights...
import numpy as np import pandas as pd import shapely.wkt from sklearn.metrics import pairwise_distances from sklearn.metrics import mean_squared_error import init import constants as cn from coordinate import Coordinate def proximity_ratio(df_destinations): """ Calculate proximity ratio and summarize by bloc...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import argparse import logging import traceback import re import json import sys import os import oi_utils logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) pointer_name_hint = "##<" empty_t...
# # Copyright (c) 2019 UCT Prague. # # test_aclrecordsearch.py is part of Invenio Explicit ACLs # (see https://github.com/oarepo/invenio-explicit-acls). # # 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 t...
import random import sys import time import uuid from textwrap import dedent import click from globus_sdk import RefreshTokenAuthorizer, TransferClient from globus_sdk.base import safe_stringify from globus_sdk.exc import NetworkError from globus_cli import version from globus_cli.config import ( get_transfer_tok...
#!/usr/bin/python # -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 3, or (at your option) any later # version. # # This program is distributed in the...
import numpy as np import sys import pandas as pd from pathlib import Path import matplotlib as mpl from matplotlib import pyplot as plt import stat_tools as st from datetime import datetime from scipy import ndimage from scipy.optimize import minimize from scipy.optimize import least_squares import ephem import config...
# -*- coding: utf-8 -*- """ Created on Sun Dec 11 16:51:10 2016 @author: Derek """ '''This is the final that will perform analyisis on the models Specifically, it will be performing "black box" testing. The main components of the file: Loading the models In the case of the BayesNet, we...
import networkx as nx import json import yaml import requests import requests_cache import os from tranql.concept import BiolinkModelWalker from collections import defaultdict from tranql.exception import TranQLException from tranql.redis_graph import RedisGraph class NetworkxGraph: def __init__(self): sel...
# # Conversion utilities for sound files for use with mimi speach to text # # This is the robots ears and voice # # we go from 44KHZ stereo to 16KHZ mono # # import sys import os import wave from sound import * import numpy as np from pylab import * import struct import scipy.signal import numpy as np from pydub impor...
# -*- coding: utf-8 -*- # # Copyright 2018 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 requir...
# # Copyright 2015, 2016, 2017 Human Longevity, 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 ...
import numpy as np from pylot.utils import Location, Rotation, Transform def create_rgb_camera_setup(camera_name, camera_location, width, height, fov=90): transform = Transform(camera_location, Rotatio...
#!/usr/bin/python # Copyright (c) 2017 Alibaba Group Holding Limited. <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU Genera...
import gzip import os from urllib.request import urlretrieve import numpy as np import tensorflow as tf from odin.fuel.dataset_base import IterableDataset, get_partition from odin.utils import md5_checksum, one_hot from odin.utils.net_utils import download_and_extract # =============================================...
import numpy as np from silx.gui.plot import PlotWidget, PlotWindow from silx.gui.plot.ComplexImageView import ComplexImageView from silx.gui import qt import nmutils import scipy.interpolate class ProbeManager(object): """ Class which coordinates the various probe plots and widgets, propagates and so on. ...
import argparse import json from mimic import log from mimic.utils.BaseFlags import parser as parser from mimic.utils.filehandling import expand_paths import os import numpy as np from typing import Union def str2bool(v): if isinstance(v, bool): return v if v.lower() in ('yes', 'true', 't', 'y', '1')...
import os import itertools import torch import torch.nn as nn import torch.nn.parallel import torch.utils as tutils import torchvision.transforms as transforms import numpy as np from tqdm import tqdm from fsgan.utils.obj_factory import obj_factory from fsgan.utils.tensorboard_logger import TensorBoardLogger from fsgan...
from process.utils import * abspath = os.path.dirname(os.path.normpath(os.path.abspath(os.path.dirname('')))) sys.path.insert(0, os.path.abspath('../src')) raw_row_holder = {} curated_row_holder = {} presentation_row_holder = {} def generate_profile(profile_path, title, key, df, filename, layer=None) -> None: ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2020, <NAME> <<EMAIL>> # Copyright (c) 2020, <NAME> <<EMAIL>> # # 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://ww...