text
stringlengths
8.04k
46.5k
# coding: utf-8 # # Floating IP Addresses manager (IPFloater) # Copyright (C) 2015 - GRyCAP - Universitat Politecnica de Valencia # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versio...
""" code to train a discrete VAE """ import os import torch import random import argparse import numpy as np from PIL import Image from uuid import uuid4 from tqdm import trange from torch import nn, einsum import torch.nn.functional as F import matplotlib.pyplot as plt from torchvision import transforms from torch.uti...
""" Common routines to work with raw MS data from metabolomics experiments. Functions --------- detect_features(path_list) : Perform feature detection on several samples. feature_correspondence(feature_data) : Match features across different samples using a combination of clustering algorithms. """ import pandas as ...
""" Compute topological invariants. This module offers a high level framework for analyzing topological materials in a high-throughput context with VASP, Z2Pack, irvsp, and Vasp2Trace. """ import numpy as np import warnings from monty.json import MSONable from pymatgen.analysis.local_env import MinimumDistanceNN...
from django.shortcuts import get_object_or_404, render_to_response, render from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_required from stamps.models import Stamp, Collection, ImQuery, ImList, UserProfil, StampInCatalog, ContactRelationship, Interest, Transac...
# # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # Lead Developers: <NAME> and <NAME> # Authors: <NAME>, <NAME>, <NAME>, <NAME> # Research Leads: <NAME>, <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lic...
import numpy as np import os import io import glob import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns import tensorflow as tf import tensorflow_datasets as tfds import itertools import pickle from collections import defaultdict from sklearn.manifold import TSNE from dtaid...
#!/usr/bin/env python # coding: utf-8 """" Usage: python show_data.py """ # In[1]: import numpy as np from scipy import spatial import math import sys import os # ## 一、自定义函数 # ### 1.获取模型信息 # In[2]: def get_edges(faces): """ 根据面得到相应的边 @faces: 模型的所有面 return: 模型的边 """ edge2key = dict() ...
from collections import defaultdict from typing import Callable, Optional from mip import * from flask import (Blueprint, render_template, request, session, redirect, abort, flash, url_...
''' TensorBase and dense Tensor Class. ''' import numpy as np from numpy import array from scipy.linalg import svd, eigh, eig from abc import ABCMeta, abstractmethod import copy import pdb import numbers import itertools from .basic import ldu, dpl from ..blockmarker import join_bms, BlockMarker, block_diag __all__ ...
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of mudl. # Copyright (C) 2015 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # with...
""" ftptoolz module =============== The Ftpzos class in ftptoolz contains z/OS specific methods for accessing the SPOOL and datasets. Jobs ---- * submit() * listjobs() * listjob() * deletejob() * getjoblines() PDS dataset ----------- * memberinfo() * memberlines() * members() * getbinaryfile() * getfile() * getlin...
# Copyright (c) 2016, <NAME> # Licensed under the BSD 3-clause license (see LICENSE) # pylint: skip-file import subprocess import re import os import sys import logging import scipy.io as sio import contexttimer import numpy as np import pandas as pd import numpy as np from runlmc.lmc.functional_kernel import Funct...
import json from hashlib import sha1 from datetime import datetime from database import PostgresqlDatabase, SQLiteDatabase from archiver_listeners import ChangeEngineListener ARCHIVER_VERSION = "1.1.1" SUPPORTED_TIMESTAMP_FORMATS = ( "%Y%m%d %H:%M:%S.%f", "%Y-%m-%d %H:%M:%S.%fZ", "%Y-%m-%d %H...
import asyncio import random import re from io import BytesIO from traceback import format_exception from typing import Optional, Type, Union from async_timeout import timeout from discord import Color, File, HTTPException, Member, TextChannel, VoiceState from discord.embeds import _EmptyEmbed, EmptyEmbed as Empty fro...
''' (Basic) Functions that are completely INDEPENDENT of all other modules of this package. ''' import ccdproc import numpy as np from astropy import units as u from astropy.time import Time __all__ = ["MEDCOMB_KEYS_INT", "SUMCOMB_KEYS_INT", "MEDCOMB_KEYS_FLT32", "LACOSMIC_KEYS", "circular_mask", "_image_s...
"""cell_population Written by <NAME>, <NAME>, and <NAME> Supervised by <NAME> Computational Neuroscience Unit, Okinawa Institute of Science and Technology March, 2020 """ import numpy as np from pathlib import Path import csv from .util import str_l, Query_point from tqdm import tqdm class Cell_pop(object): de...
#!/usr/bin/python # (c) 2021, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' na_cloudmanager_cvo_azure ''' from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' module: na_cloudmanager_cvo_azure short...
#! /usr/bin/python # -*- coding: utf8 -*- # Copyright 2016 The TensorLayer Contributors. 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/l...
import datetime import platform import time import discord from discord.ext import commands import config from cogs.utils.tools import resolve_emoji about_description = """ **H-hello!~~** My name is Godavaru, but you can call me Goda, as many people do. I was named after a community server that my mom made when she ...
# encoding=utf-8 import xml.etree.ElementTree as ET import pickle import os import re import sys import shutil import math from os import listdir, getcwd from os.path import join from collections import defaultdict import cv2 import numpy as np car = ["saloon_car", "suv", "van", "pickup"] other = ["shop_truck", "unkno...
''' Created on 21 May 2010 @author: EWillemse ''' from copy import deepcopy import optDirectHeuristic as optD class SinlgeRouteModifications(object): def __init__(self, info): self.info = info self.SP = self.info.spDistanceD self.IFD = self.info.bestIFdistD self.best...
# -*- coding: utf-8 -*- from __future__ import print_function from collections import namedtuple as NamedTuple import abc import colorama import clu.abstract import collections.abc import inspect import textwrap import sys, re abstract = abc.abstractmethod from clu.constants.consts import ENCODING, SEPARATOR_WIDTH f...
""" desitarget.cmx.cmx_cuts ======================== Target Selection for DESI commissioning (cmx) derived from `the cmx wiki`_. A collection of helpful (static) methods to check whether an object's flux passes a given selection criterion (*e.g.* STD_TEST). .. _`the Gaia data model`: https://gea.esac.esa.int/archive...
######## # Copyright (c) 2014-2019 Cloudify Platform Ltd. 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 ...
#!/usr/bin/env python3 #pylint: disable = C, R #pylint: disable = E1101 # no-member (generated-members) #pylint: disable = C0302 # too-many-lines """ This code features the article "Pareto-based evaluation of national responses to COVID-19 pandemic shows that saving lives and protecting economy are non-trade-o...
#!/usr/bin/python3 # # Author: # @oldboy21 # https://github.com/oldboy21/smbsr/ import socket import argparse import logging import sys import ipaddress import urllib import tempfile import re from smb import * from smb.SMBConnection import SMBConnection from smb.SMBHandler import SMBHandler from io import BytesI...
''' By <NAME> Contact at: <EMAIL> Game Title: TBA for now its "Game 2" Dear Future Adam, If you ever successfully document this program, please go to the hospital, because in the event that documentation is complete I suspect your hands will be shattered and your ears bleeding.''' import sys,random, time, math, ...
""" Nuclei Module ============== This module performs nuclei detection, segmentation, and cytometry. These include the following subcommands: - detect : detect all nuclei in image - segment : segment all detected nuclei - fluorescence : measure fluorescence for each cell - gate : assign cell-type lab...
""" Copyright Digisim, Computer Architecture team of South China University of Technology, 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 ...
#!/usr/bin/env python3 import sys from io import StringIO class Node: """Trida Node slouzi k reprezentaci uzlu v B-strome. Atributy: keys pole obsahujici klice daneho uzlu children pole obsahujici reference na potomky leaf urcuje, zdali je uzel list Poznamka: Nar...
### # # Lenovo Redfish Library - AccountClient Class # # Copyright Notice: # # Copyright 2020 Lenovo Corporation # # 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...
# adapted from https://github.com/facebookresearch/detectron2/blob/master/detectron2/data/build.py # pylint: disable=bad-continuation,bad-whitespace,pointless-string-statement,redefined-outer-name,wrong-import-order import itertools import random import logging import operator import dill import pickle from pprint impo...
import numpy as np import numba import re # Determine and import the correct version of numba based on its local version #***** version = numba.__version__ dots = re.finditer('[.]', version) positions = [match.start() for match in dots] version = version[:positions[1]] version = float(version) if version >= 0.49: ...
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * import random from PyQt5.QtMultimedia import QMediaContent, QMediaPlayer from PyQt5.QtMultimediaWidgets import QVideoWidget import os FOLDER = os.getcwd() dataGEN = [0, 0, 0, 0, 0, 0, 0, 0, 0] class Exp1_class(QTabWidget):...
#!/usr/bin/env python3 # vim: set fileencoding=utf-8 fileformat=unix : # Copyright (C) 2013 <NAME> <<EMAIL>> All rights reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AN...
import numpy as np import pandas as pd from pohmm import Pohmm from scipy import interp from itertools import chain from scipy.stats import wilcoxon from sklearn.svm import OneClassSVM from sklearn.mixture import GMM from sklearn.metrics import auc, accuracy_score from .io import load_data, load_results, save_results,...
import json, cgi, os, sys, hashlib, time from urllib.parse import * from pymongo import * from urllib import * # from app.report.report import * from datetime import datetime, timedelta from libs.perm.perm import * from libs.table.table import create_empty_row_ from libs.contents.contents import get_doc, get_mt fr...
import datetime import json import numpy as np import os import pickle import tensorflow as tf os.environ['TF_CPP_MIN_VLOG_LEVEL'] = '0' os.environ['TF_CPP_MIN_LOG_LEVEL'] = '0' from absl import logging logging.set_verbosity(logging.INFO) from sklearn.linear_model import LinearRegression import local_settings from cl...
import re import sys import argparse from math import log from datetime import datetime from Bio.SearchIO import parse from DomainMapper import LatestDomains, IODomains # returns the combination of two E-Values (treated as psuedo P-Values) with Tippett's method def log_mean_E_val(eval_A, eval_B): if eval_A == eval...
""" The MIT License (MIT) Copyright (c) 2020 <NAME>. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import tkinter as tk from tkinter import ttk from tkinter import* from tkinter import filedialog from tkinter import messagebox import os from pynput.mouse import Controller import keyboard import tempfile import win32api import win32print fro...
##Collect data: ''' #SMI: 2021/2/9 SAF: 307138 Standard Beamline 12-ID proposal: 308023 (CFN, 307961) create proposal: proposal_id( '2021_1', '307138_Dinca' ) #create the proposal id and folder %run -i /home/xf12id/.ipython/profile_collection/startup/users/30-user-Dinca2021C2B.py RE( shopen() ) ...
import numpy import cellprofiler_core.image import cellprofiler_core.measurement from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, COLTYPE_INTEGER import cellprofiler.modules.classifyobjects import cellprofiler_core.object import cellprofiler_core.pipeline import cellprofiler_core.workspace OBJECTS...
# Copyright 2021, <NAME>, mailto:<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 by applicable law or agreed to in w...
from numpy import arange #!/usr/local/bin/python2.5 #/*****************************/ #/* flops.c */ #/* Version 2.0, 18 Dec 1992 */ #/* <NAME> */ #/* <EMAIL> */ #/*****************************/ __author__ = '<NAME>' """ /* Flops.c is a 'c' program which attempts to es...
import matplotlib.pyplot as pl import numpy as np import pandas as pd from pyitab.analysis.results.base import filter_dataframe from pyitab.analysis.results.dataframe import apply_function import seaborn as sns from matplotlib.colors import LinearSegmentedColormap def find_distance_boundaries(data): scene_center ...
import numpy as np np.random.seed(7) import tensorflow as tf import datetime import time import threading import math import random random.seed(7) import os import matplotlib.pyplot as plt import matplotlib.animation as animation from keras.models import * from keras.layers import * from keras import ba...
# -*- coding: utf-8 -*- # Copyright (c) 2016 by University of Kassel and Fraunhofer Institute for Wind Energy and Energy # System Technology (IWES), Kassel. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import pandapower as pp import pytest ...
# Copyright 2010-2018 Canonical Ltd. # Copyright 2020 <NAME> # All Rights Reserved """A units converter.""" import collections import itertools import logging import math import random import re import sys import pint __all__ = ['convert'] logger = logging.getLogger(__name__) _ureg = pint.UnitRegistry() UnitInfo...
# Copyright 2011-2013 <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,...
# ----------------------------------------------------------------------------# # Imports # ----------------------------------------------------------------------------# # Flask stuffs from flask import Flask, render_template, request, redirect, flash, url_for, session # from flask_debugtoolbar import DebugToolbarExte...
# -*- coding: utf-8 -*- """Model training methods. Authors: <NAME> - <EMAIL> <NAME> - <EMAIL> Todo: * Docstring * Batch size for predictions arg. * move early stopping code block as a callable function. * scalable approach for setting class distribution. we can add a additional column ...
from simuleval.agents import Agent,TextAgent, SpeechAgent from simuleval import READ_ACTION, WRITE_ACTION, DEFAULT_EOS from typing import List,Dict, Optional import numpy as np import math import torch from collections import deque from torch import Tensor import torch.nn as nn from fairseq import checkpoint_utils, opt...
import random import sys from os import path import tensorflow as tf import numpy as np import pandas as pd from Bio.Seq import Seq import threading import pybedtools import os import glob from maxatac.architectures.dcnn import get_dilated_cnn from maxatac.utilities.constants import BP_RESOLUTION, BATCH_SIZE, CHR_POO...
# -*- coding: utf-8 -*- # $Id: report.py $ """ Test Manager - Report models. """ __copyright__ = \ """ Copyright (C) 2012-2015 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or modify i...
import sys, os, importlib, math, shutil import rasterio import skimage import numpy as np import pandas as pd import geopandas as gpd import osmnx as ox import GOSTnets as gn import skimage.graph as graph from rasterio.mask import mask from rasterio import features from rasterio.warp import reproject, Resampling from...
import math import os import random import shutil import pandas as pd import json def visualize(tree, size=10): from matplotlib import pyplot from mpl_toolkits.mplot3d import Axes3D, art3d def draw_all_nodes(node, ax): for pnt in node.points: ax.scatter3D(pnt.x, pnt.y, pnt.z, s=5) ...
# coding=utf-8 # Copyright (C) 2021 ServiceNow, Inc. """ Finetuning for running PAIRING and MULTICLASS-MULTILABEL classification finetuning on NRCan data and the original Glue benchmarks This script is a SIGNIFICANTLY MODIFIED version of the run_glue.py script provided by HuggingFace in the Transformers r...
from collections import defaultdict from datetime import date, datetime from typing import Callable, Type, Dict, List, Optional from functools import partial import numpy as np from pandas import DataFrame import plotly.graph_objects as go from plotly.subplots import make_subplots from vnpy.trader.constant import ( ...
import numpy as np from emcee import EnsembleSampler from .ls import wls_simple class TGMMachine(): """ the TGM Machine class """ def __init__(self, isoc_stacked, tgm_cols=("teff", "logg", "_mhini"), tgm_sigma=(100, 0.2, 0.1), w_sigma=(100, 0.2, 0.1), pred_cols=("teff", "lo...
"""Test cases for traceback module""" from collections import namedtuple from io import StringIO import linecache import sys import unittest import re from test.support import run_unittest, Error, captured_output from test.support import TESTFN, unlink, cpython_only from test.script_helper import assert_python_ok impo...
""" Deep Layer Aggregation and DLA w/ Res2Net DLA original adapted from Official Pytorch impl at: DLA Paper: `Deep Layer Aggregation` - https://arxiv.org/abs/1707.06484 Res2Net additions from: https://github.com/gasvn/Res2Net/ Res2Net Paper: `Res2Net: A New Multi-scale Backbone Architecture` - https://arxiv.org/abs/19...
#!/usr/bin/env python # Copyright 2016 <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 """ completion.py - Tab comp...
#!/usr/bin/env python3 """ Copyright 2017 <NAME> (<EMAIL>) https://github.com/rrwick/Porechop This module contains the class for a Nanopore read. This file is part of Porechop. Porechop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fre...
#!/usr/bin/env python3 from cereal import car from math import fabs from common.conversions import Conversions as CV from common.params import Params from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint, get_safety_config from selfdrive.car.gm.values import CAR, Cruise...
import os from subprocess import call, Popen, PIPE import re import os import sys import json from datetime import datetime from shutil import copy2 from glob import glob import P4_aux as aux def api_set_lib_paths(lib, template_dir): lib.h_template_path = os.path.join(template_dir, 'sai_lib_template.h') lib.name ...
# 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...
from io import BytesIO from typing import cast, Optional, Union import io from PIL import Image, ImageDraw from discord.ext import commands import discord from utils.kurisu import KurisuBot class Utility(commands.Cog): """A module filled with informative commands. Could be info a bout a guild, user, etc""" ...
from pypy.objspace.std.objspace import * from pypy.interpreter.function import Function, StaticMethod from pypy.interpreter import gateway from pypy.interpreter.typedef import weakref_descr from pypy.objspace.std.stdtypedef import std_dict_descr, issubtypedef, Member from pypy.objspace.std.objecttype import object_type...
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
import os import re import json import warnings from io import open from .validation import BIDSValidator from .. import config as cf from grabbit import Layout, File from grabbit.external import six, inflect from grabbit.utils import listify from collections import defaultdict from functools import reduce, partial fro...
import os import numpy as np import cv2 import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader import tqdm import concurrent.futures import pickle from skimage import transform def augment_image(image, k, channels): if channels==1: image = image[:, :, 0] image = transform.rota...
from eggshell import utils from eggshell import config from datetime import datetime as dt from datetime import timedelta # import logging # logger = logging.getLogger(__name__) import logging LOGGER = logging.getLogger("PYWPS") _PRESSUREDATA_ = [ 'NCEP_slp', 'NCEP_z1000', 'NCEP_z925', 'NCEP_z850', 'NCEP_z700', ...
""" Exhaustive BFS and Offline Controller. """ import importlib from collections import deque import json import copy import time import random import os import platform try: from queue import Queue except ImportError: from Queue import Queue from ai2thor.controller import Controller, distance from .base_con...
# Copyright 2020 StreamSets Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
""" @author: <NAME> <<EMAIL>> """ import numpy from .linear_chain_crf import LCRFModelRepresentation, LCRF from .utilities import ( HOSemi_AStarSearcher, vectorized_logsumexp, generate_partitions, generate_partition_boundaries, ) class HOSemiCRFADModelRepresentation(LCRFModelRepresentation): r"""...
# -*- coding: utf-8 -*- """This module defines classes and functions for browsing QuartataWeb. ---------------------------------------------------------------------------------------- Based on code written by the CHARMM-GUI team (http://charmm-gui.org) and modified by <NAME> This suite uses the following softwares: a...
# Copyright 2020 The TensorFlow Probability 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 ...
# # 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 us...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from warnings import warn import collections import socket import json import urllib.request import urllib.error import urllib.parse import numpy as np import erfa from astropy import units as u from astropy import constants as consts from astropy.units...
# <NAME> (Itzik) <<EMAIL>> # <NAME> <<EMAIL>> import torch.utils.data as data import numpy as np import scipy.spatial as spatial import utils.visualizations as vis from abc import ABC, abstractmethod from matplotlib.path import Path import torch class BasicShape2D(data.Dataset): # A class to generate synthetic ex...
# # Copyright (C) 2012 - 2017 <NAME> <ssato at redhat.com> # License: MIT # # pylint: disable=missing-docstring, invalid-name, no-member from __future__ import absolute_import import copy import logging import io import os import os.path import unittest import anyconfig.api as TT import anyconfig.backends import anyc...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from __future__ import division import os import numpy as np from collections import namedtuple # color pallette link: http://paletton.com/#uid=72Q1j0kllllkS5tKC9H96KClOKC base_file_start = r"""\documentclass[border=0pt]{standalone} % <NAME> 2018 % Based off code by <NAME> (2014), who based his code off <NAME>: h...
# ***************************************************************************** # Copyright (c) 2019, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Train a video classification model.""" import numpy as np import pickle import pprint from timm.data import Mixup import torch from fvcore.nn.precise_bn import get_bn_modules, update_bn_stats from slowfast.config.defaul...
# -*- coding: utf-8 -*- """ Created on Wed May 3 09:57:52 2017 @author: Lab41: Github: Circulo/circulo/algorithms/rolx.py #### https://github.com/Lab41/Circulo/blob/master/circulo/algorithms/rolx.py Set of functions to compute the RolX featurization """ import sys import math import igraph import numpy as np from...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 <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...
#!/usr/bin/python # -*- coding: utf-8 -*- ###################################################################################################################### # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
"""Command line interface""" from __future__ import annotations import sys, os, logging, json, re import asyncio from contextlib import ExitStack from copy import deepcopy from datetime import datetime from typing import Optional, Callable, Awaitable import pydicom from pydicom.dataset import Dataset from pydicom.data...
""" An extension of AllenNLP's BERT pretrained helper classes. Supports modification to BERT dropout, and applies a sliding window approach for long sentences. """ from typing import Dict, List, Callable, Tuple, Any import logging import collections from overrides import overrides import torch import torch.nn.functi...
""" Color definitions are used as per CSS3 specification: http://www.w3.org/TR/css3-color/#svg-color A few colors have multiple names referring to the sames colors, eg. `grey` and `gray` or `aqua` and `cyan`. In these cases the LAST color when sorted alphabetically takes preferences, eg. Color((0, 255, 255)).as_name...
"""Support for Xiaomi Aircondition.""" import logging from enum import Enum from homeassistant.const import * # noqa: F401 from homeassistant.components.climate import ( DOMAIN as ENTITY_DOMAIN, ClimateEntity, ) from homeassistant.components.climate.const import * from . import ( DOMAIN, CONF_MODEL, ...
# Copyright 2004-2021 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish,...
# # See ../LICENSE # # This file is the main support for recovery of InnoDB types, both Compact and Redundant. # The differences there are in the header and layout of the fields. # # import struct import base64 from scanner_shared import BufferSizeException, FieldImpossibleException, ImplementationException, RecordI...
import inspect import json import os import warnings from subprocess import ( Popen, PIPE, STDOUT, ) import numpy as np import pandas as pd from tqdm import tqdm import tensorflow as tf import tensorflow.compat.v1.logging as logging from utils import ( load_graph, hash_, validate, handle_s...
import logging from thespian.actors import * from thespian.system.utilis import (thesplog, checkActorCapabilities, foldl, join, fmap, AssocList, actualActorClass) from thespian.system.timing import ExpirationTimer, currentTime from thespian.system....
#!/usr/bin/env python # -*- coding: utf-8 -*- # DickServ IRC Bot - Developed by acidvegas in Python (https://acid.vegas/dickserv) # irc.py import socket import time import config import constants import database import debug import functions import httplib from commands import * # Load optional modules if config.co...