text
stringlengths
8.04k
46.5k
import logging import time from typing import List from modelexp import exputils from modelexp.exputils import ModelSample, anchor_samples_to_model_samples, model_samples_from_json from models.feteldeep import * from models.fetentvecutils import ELDirectEntityVec, MentionFeat from utils import datautils, utils def _...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, SUPERUSER_ID from odoo.tools.translate import _ from odoo.exceptions import UserError AVAILABLE_PRIORITIES = [ ('0', 'Normal'), ('1', 'Good'), ('2', 'Very Good'), ('...
import torch import torch.nn as nn from torch.nn import init import torchvision import functools from torch.autograd import Variable from torch.optim import lr_scheduler import torch.nn.functional as F import numpy as np import math ############################################################################### # Func...
"""\ Lisp code generator How the code is generated: every time the end of an object is reached during the parsing of the xml tree, either the function 'add_object' or the function 'add_class' is called: the latter when the object is a toplevel one, the former when it is not. In the last case, 'add_object' calls the ap...
# Lint as: python3 # Copyright 2019 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# 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 ...
import os os.environ["PYTHONIOENCODING"] = "utf-8" os.environ["CUDA_VISIBLE_DEVICES"] = '1' import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from tensorflow.keras import regularizers from tensorflow.keras import metrics from tensorflow.keras.models import * from tensorflow.kera...
# Copyright 2019 The Keras Tuner 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
""" This module contains functions related to gathering information from non NHL APIs & websites (ex - lineups, officials, etc). """ import logging from datetime import datetime, timedelta import requests from bs4 import BeautifulSoup from dateutil.parser import parse from fake_useragent import UserAgent from request...
"""Functional interface""" from numbers import Integral import torch from . import _functions from .modules import utils from ._functions.padding import ConstantPad2d from ..autograd import _functions as _autograd_functions from .modules.utils import _single, _pair, _triple # Convolutions ConvNd = torch._C._function...
from collections import OrderedDict import numpy as np from matplotlib.patches import Rectangle from sklearn.cluster import KMeans from sklearn.decomposition import PCA from sklearn.preprocessing import normalize from tensorflow.python import keras from tensorflow.python.keras import backend as K from PIL import Imag...
import numpy as np import os import os.path as osp import json import torch from rpn.db import SequenceDB, SAMPLE, SEQUENCE from torch.utils.data import Dataset, Sampler from torch.utils.data.dataloader import default_collate from rpn.utils.torch_graph_utils import construct_full_graph, get_edge_features import rpn.uti...
""" This code is a modified version of some of the tf.keras.callbacks modules. """ import os import tempfile import re import numpy as np from tensorflow.compat.v1.keras.callbacks import Callback from tensorflow.python.keras import backend as K from tensorflow.python.platform import tf_logging as logging from tensorf...
# Copyright 2017 Reswitched Team # # Permission to use, copy, modify, and/or distribute this software for any purpose with or # without fee is hereby granted, provided that the above copyright notice and this permission # notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WAR...
##--------------------Coding References---------------------## # Percentage of borrowed code: 5% - Parts of the MC-dropout and data preprocessing normalisation step are borrowed, # The UNET model is adapted from my own previous work on 3D UNETs. It was modified to include 2D convolution layers and dropout layers. ...
"""Testing phoenix utilities.""" import itertools import os from types import GeneratorType import numpy as np import pytest from spectrum_overload import Spectrum from mingle.utilities.phoenix_utils import closest_model_params from mingle.utilities.phoenix_utils import (gen_new_param_values, ...
# 07/04/2020, <NAME>, Postdoc, Edinburgh # Read in and compare the model fits: Compare_Mag = False # Compare fit params/model including/excluding # the impact of magnification. Compare_Single_Bin = True # Compare fit params obtained for each l+s bin individually ...
#coding:utf-8 # # PROGRAM/MODULE: firebird-lib # FILE: firebird/lib/gstat.py # DESCRIPTION: Module for work with Firebird gstat output # CREATED: 6.10.2020 # # The contents of this file are subject to the MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
# -*- coding: iso-8859-15 -*- import os, re, sys import numpy as np, scipy.sparse as sp, scipy.stats as stats from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.model_selection import GridSearchCV, ParameterGrid, StratifiedKFold from sklearn.metrics import accuracy_score from sklearn.ensemble...
import distutils.file_util import enum import gzip import io import json import logging import os import random import shutil import tarfile import tempfile import uuid import warnings import zipfile from distutils.util import strtobool from pathlib import Path from typing import ( Any, Container, Dict, ...
from haarPsi import haar_psi import mpl_interaction as mpl import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt from multiprocessing.pool import ThreadPool import sys import os.path import imghdr import time import cv2 import numpy as np import argparse import psutil import math from ski...
from mpi4py import MPI from tacs import TACS, elements from tmr import TMR from paropt import ParOpt import numpy as np from six import iteritems try: from scipy.optimize import minimize except: minimize = None def createTopoProblem(forest, callback, filter_type, nlevels=2, repartition=Tr...
"""The backend-module.""" # from typing import TypedDict from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Union import datetime import operator import os import pathlib import pydantic from pydantic import DirectoryPath from pydantic import Validati...
# coding: utf-8 import os import sys import pymongo as mongo import json import pandas as pd import numpy as np from datetime import date, datetime import time from time import strftime, localtime from QUANTAXIS.QAFetch import QATdx as tdx from easyquant.easydealutils.easytime import EasyTime import re class MongoIo(ob...
import numpy as np import torch import data import utils class BatchGenerator(object): def __call__(self): pass def for_eval(self): pass def total_batches(self): pass class DocumentBatchGenerator(BatchGenerator): """A batch generator that only generates word batches. E...
#!/usr/bin/env python """ radarData.py This file holds the RadarData class that hold the radar data and processes it. @author: <NAME> """ import ipdb import scipy as sp # My modules from isrutilities.physConstants import v_C_0, v_Boltz from SimISR import Path from SimISR.IonoContainer import IonoContainer from SimISR....
""" You have to write the perc_train function that trains the feature weights using the perceptron algorithm for the CoNLL 2000 chunking task. Each element of train_data is a (labeled_list, feat_list) pair. Inside the perceptron training loop: - Call perc_test to get the tagging based on the current feat_vec a...
""" this is the main GUI interface of the program. author: <NAME> build time: 11/9/2019 19:45 COPYRIGHT INFORMATION: Copyleft (C) 2020 <NAME> this software is licensed under Unlicense license This is free and unencumbered software released into the public domain. THE SOFTWARE IS PROVIDED "AS IS", WIT...
from model.ActionType import ActionType from model.Game import Game from model.Move import Move from model.Player import Player from model.World import World from model.VehicleType import VehicleType from collections import deque, namedtuple import numpy as np from math import * LOG = False TILE_SIZE = 32 UNIT_RAD...
""" Copyright (c) 2021, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause """ """Transformer speech recognition model (pytorch).""" import pdb from argparse import Namespace from ...
""" animationcontrol.py <NAME> 1/23/2020 """ from random import randrange import wx import wx.lib.newevent from layermanager import * from settings import * END_FRAME_HANDLE = 0 INFO_BAR_HEIGHT = 20 NUN_LABEL_WIDTH = 30 LABEL_FONT_SIZE = 8 MIN_MARKER_SIZE = 20 FrameChangedEvent, EVT_FRAME_CHANGED_EVENT ...
""" Helper functions for PASTIS. """ import glob import os import datetime import importlib import itertools import time from shutil import copy import sys from astropy.io import fits import astropy.units as u import fpdf import logging import logging.handlers import numpy as np from PyPDF2 import PdfFileMerger from ...
""" TODO: Break out these augmentations into submodules for easier reference. TODO: Rewrite this code to be briefer. Take advantage of common python class structures """ import numpy as np from scipy.sparse import csr_matrix from deepneuro.utilities.util import add_parameter class Augmentation(object): de...
import os,shutil,glob class _T(str): def __call__(self, s): if s.upper()==self or s==self: return True else: return False CONST_TYPE=_T class TMetaClass(type): def __new__(cls, name, bases, attrs): dic=attrs.copy() for k,v in attrs.items(): if ...
import numpy as np import torch import sys from collections import namedtuple, defaultdict import copy from nndct_shared.base.key_names import FrameworkType from nndct_shared.nndct_graph import Operation from nndct_shared.nndct_graph import Tensor, Node from nndct_shared.utils import tensor_util from .utils import * f...
# Copyright 2019 Google 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, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import unittest as ut import numpy as np from mykit.core.cell import (Cell, CellError, atoms_from_sym_nat, axis_list, periodic_duplicates_in_cell, sym_nat_from_atoms) from mykit.core.constants import ANG2AU, AU2ANG, PI from mykit.c...
#I. cleangot(): clean dfgot from wikiling.de #1. insert links() #2. every lemma() to own row #3. occurences() to own col #4. certainty() to own col #5. reconstructedness() to own col #6.a clean col lemma #6.b clean col lemma #6. translations() #7.a activate got-ipa transcription ...
#!/usr/bin/env python # Copyright 2020 <NAME> # author: <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://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
# -*- coding: utf-8 -*- """Read and write parameters, results and metadata to the 'sim_db' database.""" # Copyright (C) 2017-2019 <NAME> <<EMAIL>> # Licenced under the MIT License. import sim_db.src_command_line_tool.commands.helpers as helpers import sqlite3 import argparse import subprocess import time import hashli...
#!/usr/bin/python -u # -*- coding: latin-1 -*- # # Set covering in Z3 # # Some set covering problems. See below for descriptions. # - Placing of firestations, from Winston 'Operations Research' # - Minimize the number of security telephones in street corners on a campus. (Taha) # - Senators making a committee (<NAME>)...
from pathlib import Path from sqlite3 import OperationalError import pandas as pd import pytest from scipy.sparse import csr_matrix from asreview import ASReviewData from asreview.project import ASReviewProject from asreview.project import ProjectExistsError from asreview.project import open_state from asreview.setti...
# Copyright 2016 # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import sys # We need sys so that we can pass argv to QApplication from pathlib import Path from dataclasses import dataclass import numpy as np from PyQt5 import QtWidgets, QtCore, QtGui, uic import pyqtgraph as pg import easyqc.qt COLOR_PLOTS = (pg.mkColor((31, 119, 180)),) class EasyQC(QtWidgets.QMainWindow): ...
# write function to average across frames to give ensembled averaged cosine theta values at each N - 1 value import MDAnalysis as mda import statsmodels as stats import math import numpy as np import pandas import sklearn import scipy as scipy import warnings # Use sklearn to do fitting from sklearn.linear_model impo...
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Oct 26 2018) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! ########################################################################### impor...
from __future__ import print_function, division from itertools import permutations from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.mul import Mul from sympy.core.symbol import Wild, Dummy from sympy.core.basic import sympify from sympy.core.numbers import Rational, pi from sympy.core...
# Copyright 2019 DeepMind Technologies Limited. 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 ...
#!/usr/bin/env python # Compatible with Python 2.7 and 3.2+, can be used either as a module # or a standalone executable. # # Copyright 2017, 2018 Institute of Formal and Applied Linguistics (UFAL), # Faculty of Mathematics and Physics, Charles University, Czech Republic. # # This Source Code Form is subject to the te...
import logging from urllib.parse import quote from django import http from django.conf import settings from django.contrib import messages from django.contrib.auth import login from django.shortcuts import redirect from django.urls import reverse, reverse_lazy from django.utils.translation import gettext as _ from dja...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2019, Battelle Memorial Institute. # # 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...
import typing import asyncio import discord import datetime from discord.ext import commands from Components.MangoPi import MangoPi def split_string(line: str, n: int): """ Function that will split the given string into specified length and append it to array. Parameters ---------- line : str ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import os import six import logging import shutil import fnmatch import calendar from codecs import open from collections import defaultdict from functools import partial from itertools import chain, groupby from operator import attrgette...
# Copyright (c) 2020 HAW Hamburg # This file is subject to the terms and conditions of the MIT License. See the # file LICENSE in the top level directory for more details. # SPDX-License-Identifier: MIT """Interface for memory map based devices. Use parsers and drivers to allow abstracted, python based register typ...
# python3 """Parse a pyi file using typed_ast.""" import hashlib import sys import typing from typing import Any, List, Optional, Tuple, Union import dataclasses from pytype import utils from pytype.ast import debug from pytype.pyi import classdef from pytype.pyi import conditions from pytype.pyi import definition...
#!/usr/bin/env python """Ninja toolchain abstraction for Clang compiler suite""" import os import subprocess import toolchain class ClangToolchain(toolchain.Toolchain): def initialize(self, project, archs, configs, includepaths, dependlibs, libpaths, variables, subninja): #Local variable defaults self.to...
# # Copyright The NOMAD Authors. # # This file is part of NOMAD. # See https://nomad-lab.eu for further info. # # 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/lic...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import sentencepiece as spm import unicodedata import six import logging from malaya.text.function import transformer_textcleaning SEG_ID_A = 0 SEG_ID_B = 1 SEG_ID_P = 0 SEG_ID_Q = 1 SEG_ID_...
# From https://github.com/snap-stanford/GraphRNN/blob/1ef475d957414d7c0bf8c778a1d44cb52dd7829b/utils.py import networkx as nx import numpy as np import torch import torch.nn as nn import torch.nn.init as init from torch.autograd import Variable import matplotlib.pyplot as plt import torch.nn.functional as F from torch ...
from exchangelib import Q, Message, ExtendedProperty from exchangelib.errors import ErrorDeleteDistinguishedFolder, ErrorObjectTypeChanged, DoesNotExist, \ MultipleObjectsReturned, ErrorItemSave, ErrorItemNotFound from exchangelib.folders import Calendar, DeletedItems, Drafts, Inbox, Outbox, SentItems, JunkEmail, M...
from django.shortcuts import render, get_list_or_404, get_object_or_404, redirect from django.http import HttpResponse, HttpResponseRedirect from django.template import loader import regex as re import functools import datetime from itertools import chain, cycle from .models import PatientDemographic, PatientYear, Note...
""" This module implements an interface to the critic2 Bader analysis code. For most Bader analysis purposes, users are referred to pymatgen.command_line.bader_caller instead, this module is for advanced usage requiring identification of critical points in the charge density. This module depends on a compiled critic2...
import pandas as pd import numpy as np import matplotlib.pyplot as plt def _jitter(data, jit=None): """ Calculate y-axis jitter for two series of data. Parameters ---------- data : DataFrame Two series of data to which y-axis jitter wants to be added. jit : int, default None Retu...
from argparse import ArgumentParser from copy import copy from enum import Enum, IntEnum, auto from queue import Empty as QueueEmpty from queue import Full as QueueFull from queue import Queue from threading import Thread from typing import Dict, List, Tuple import logging import math import numpy import pickle import ...
# Copyright 2012 OpenStack Foundation # Copyright 2015 Metaswitch Networks # Copyright 2016, 2018 Tigera, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at ...
# Copyright 2015 <NAME>. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
############################################################################## # Copyright 2009, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must r...
"""Train models using gin configuration """ import gin import gc import json import sys import os import yaml import shutil from argh.decorators import named, arg from uuid import uuid4 import numpy as np from tqdm import tqdm import keras.backend as K from bpnet.dataspecs import DataSpec from bpnet.data import NumpyDa...
from __future__ import absolute_import, print_function, division import theano import theano.tensor as T from theano import function, shared from theano.tests import unittest_tools as utt from theano.tensor.nnet.ConvTransp3D import convTransp3D, ConvTransp3D from theano.tensor.nnet.ConvGrad3D import convGrad3D, ConvGra...
# Copyright 2020 The Kale 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 wri...
from __future__ import division, print_function import numpy as np from bct.utils import cuberoot, binarize, invert def breadthdist(CIJ): ''' The binary reachability matrix describes reachability between all pairs of nodes. An entry (u,v)=1 means that there exists a path from node u to node v; alterna...
from typing import Any, Callable, Iterator, Optional, Sequence import datetime import logging import threading from urllib.parse import urlencode import warnings import grpc from descarteslabs.common.proto.xyz import xyz_pb2 from descarteslabs.workflows.client import get_global_grpc_client, Client from descarteslabs....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ FELPY __author__ = "<NAME>" __credits__ = ["<NAME>"] __license__ = "EuXFEL" __version__ = "0.2.1" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Developement" """ import shutil import numpy as np import seaborn as sns from matplotlib import pyplot as...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nicira Networks, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
#!/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 argparse import glob import json import math import sys from tqdm import tqdm import numpy as np import torch as th from torch import nn import torch.nn.functional as F import gym import minerl import os from torchsummary import summary import matplotlib.pyplot as plt from torch.utils.data import TensorDataset,...
# MAEC Distance Measure-related Classes - BETA # Copyright (c) 2018, The MITRE Corporation # All rights reserved # See LICENSE.txt for complete terms import sys try: import numpy except ImportError: sys.stdout.write("Error: unable to import required numpy module.\nSee https://pypi.python.org/pypi/numpy.") impo...
from __future__ import print_function # Copyright (c) 2013, <NAME> # All rights reserved. import unittest import numpy as np from numpy.testing import assert_array_almost_equal import matplotlib.pyplot as plt from undaqTools.steeringentropy import SteeringEntropyModel from undaqTools.misc.cdf import CDF, per...
import codecs import errno import fcntl import io import os import pty import resource import signal import struct import sys import termios import time try: import builtins # Python 3 except ImportError: import __builtin__ as builtins # Python 2 # Constants from pty import (STDIN_FILENO, CHILD) from .util...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import copy import json import logging import os import re try: import six except ImportError: from ansible.module_utils import six import s...
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: ...
""" load a branch from a root file, cut, transform, and fit optionally output fit results as csv and/or figure """ __author__ = "<NAME>" __version__ = "0.1" import os import re import sys import math import argparse import itertools import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as colo...
import sys import tkinter as tk import re # noinspection PyPackageRequirements from PIL import Image, ImageDraw # Results: """ platform: win32 windowingsystem: win32 cursors [88]: X_cursor, arrow, based_arrow_down, based_arrow_up, boat, bogosity, bottom_left_corner, bottom_right_corner, bottom_side, bottom_tee, box_sp...
# -*- coding: utf-8 -*- # # Copyright 2017 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...
# -*- coding: utf-8 -*- import csv import mimetypes import time from math import ceil from urllib.parse import urljoin, urlparse from sqlalchemy import func, Table from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import aliased from sqlalchemy.sql.expression import desc from werkzeug import secure_filena...
# -*- coding: utf-8 -*- """ Created on Mon Aug 27 09:57:42 2018 @author: tom """ import csv import pandas as pd import numpy as np #import shelve as shv import time import datetime import os CURRENCY = 'USD' PATH_TO_DIRECTORY_DEALS = 'C:\\Users\\tom\\usd_input_output_operation\\Data\\Deals' PATH...
import itertools from enum import IntEnum from typing import Dict, List, Set from uuid import uuid4 import networkx as nx import numpy as np import sm.misc as M import sm.outputs as O from grams.algorithm.semantic_graph import ( SGColumnNode, SGEdge, SGEntityValueNode, SGLiteralValueNode, SGNode, ...
"""Kerasのモデル関連。 Horovodに対応した簡単なwrapperなど。 ただし引数のデフォルトや細かい挙動を変えていたりするので要注意。 """ from __future__ import annotations import hashlib import logging import os import pathlib import tempfile import typing import numpy as np import tensorflow as tf import pytoolkit as tk # モデルの入出力の型 ModelIOType = typing.Union[ np.n...
"""Sublime commands for configuring Cargo execution. See `cargo_settings` for more details on how settings work. """ import getpass import os import re import sublime import sublime_plugin from .cargo_settings import CargoSettings, CARGO_COMMANDS from .util import index_with, get_cargo_metadata from . import rust_pro...
def mc_workflow_fsl(reference_vol="mid", FD_mode="Power", SinkTag = "func_preproc", wf_name="motion_correction_fsl"): """ Modified version of CPAC.func_preproc.func_preproc and CPAC.generate_motion_statistics.generate_motion_statistics: `source: https://fcp-...
""" Smartglass protocol core **NOTE**: Should not be used directly, use :class:`.Console` ! """ import uuid import json import base64 import logging import asyncio import socket from typing import List, Optional, Tuple, Dict, Union from xbox.sg import factory, packer, crypto, console from xbox.sg.packet.message im...
# Original Version: <NAME> (http://carpedm20.github.io) # + Source: https://github.com/carpedm20/DCGAN-tensorflow/blob/e30539fb5e20d5a0fed40935853da97e9e55eee8/model.py # + License: MIT # [2016-08-05] Modifications for Completion: <NAME> (http://bamos.github.io) # + License: MIT from __future__ import division i...
# ----------------------------------------------------------------------------- # Copyright * 2014, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. All # rights reserved. # # The Crisis Mapping Toolkit (CMT) v1 platform is licensed under the Apache #...
from tkinter import * import pickle as pickle from tkinter.ttk import * from helpers import * from Anchors import Anchor from Structures import Structure import xml.etree.ElementTree as ET import matplotlib.pyplot as plt def tv_sort(display, col, root): l = [(display.set(k, 'repr'), k) for k in display.get_chil...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache 2.0 License. import os import http import json import random import re import infra.network import infra.proc import infra.checker import infra.node import infra.crypto import infra.member import ccf.ledger from infra.proposal impo...
import time import os import json from functools import partial import logging from datetime import datetime as dt from datetime import timedelta as td import datetime from enum import Enum import shutil from pathlib import Path import socket import subprocess import glob from timeit import default_timer as timer impor...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 4 10:42:00 2019 @author: esat """ import os import time import argparse import shutil import numpy as np from tqdm import tqdm import matplotlib.pyplot as plt #Comment to train R(1+2)D # os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" # os.environ[...
# -*- coding: utf-8 -*- # # packaging.py # # Copyright (C) 2012, 2013 <NAME> <EMAIL> # # This module is part of python-pptx and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php ''' The :mod:`pptx.packaging` module coheres around the concerns of reading and writing presentations t...
# Copyright 2017 NTRLab # # 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 xml.etree.ElementTree as ET import os import json import string import copy import re import pandas as pd import numpy as np from datetime import datetime from nltk.corpus import wordnet import sys from nltk import Tree import spacy from insert_whitespace import append_text from config import DATA_PATH, TMP_PATH...