text
stringlengths
3.07k
22.1k
# 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 agreed to in writing, ...
#!/usr/bin/env python3 from sys import stderr from time import strftime, gmtime from i3_lemonbar_conf import fg_battery_50, fg_battery_25, fg_battery_10, bg_battery_0, icon_clock, icon_vol, icon_wsp, icon_prog from pulsectl import Pulse def sort_cb(el1, el2): if el1[1] < el2[1] or el1[2] < el2[2]: return ...
#!/usr/bin/env python import os.path import time import sys from config.config import Config from network.network import Network from util.sql import SnekDB from util.ark import ArkDB from util.dynamic import Dynamic from util.util import Util from subprocess import run def allocate(lb, network, telemetr...
# -*- coding: utf-8 -*- # cython: language_level=3 # Copyright (c) 2020 Nekokatt # Copyright (c) 2021-present davfsa # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inc...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2016-2017 ARM Ltd. # # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
import logging import uuid from datetime import datetime, timedelta from enum import Enum, auto from json import JSONEncoder from GramAddict.core.utils import get_value logger = logging.getLogger(__name__) class SessionState: id = None args = {} my_username = None my_posts_count = None my_follow...
# Copyright 2015 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...
# -*- encoding: utf-8 -*- # # Copyright © 2015-2017 Red Hat, Inc. # Copyright © 2015-2016 eNovance # # 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/LICE...
from db import get_db import requests from lxml.html import fromstring import string import time # https://en.wikipedia.org/wiki/List_of_largest_cities list_of_largest_cities = { 'Chongqing': 'China', 'Shanghai': 'China', 'Delhi': 'India', 'Beijing': 'China', 'Dhaka': 'Bangladesh', 'Mumbai': ...
from copy import deepcopy from warnings import warn from yaglm.solver.base import GlmSolverWithPath from yaglm.opt.algo.lla import solve_lla, WeightedProblemSolver from yaglm.opt.from_config.penalty import get_penalty_func, wrap_intercept from yaglm.opt.from_config.loss import get_glm_loss_func from yaglm.opt.utils im...
from __future__ import print_function, absolute_import import argparse import os.path as osp import random import numpy as np import sys import collections import copy import time from datetime import timedelta import tabulate from sklearn.cluster import DBSCAN, KMeans from sklearn.preprocessing import normalize impo...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import importlib import importlib.util import inspect import pkgutil import sys import warnings from collections import defaultdict from dataclasses import dataclass, field from timeit import default_timer as timer from typing import Any, Dict, List...
import os import sys import pandas as pd import pyautogui import logging import urllib3 import time from datetime import datetime # 入会结果是否发送微信消息 sendResult = True # 微信绑定SDK(此处配置自己的SDK) sdk = '**********************' # 腾讯会议应用程序路径 meetPath = "D:/Program Files (x86)/Tencent/Meet/WeMeet/wemeetapp.exe" # 微信推送消息标题 successTi...
# Copyright (C) 2013 Nippon Telegraph and Telephone 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/licenses/LICENSE-2.0 # # Unless required by applicab...
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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 a...
""" Python implementation of the fast ICA algorithms. Reference: Tables 8.3 and 8.4 page 196 in the book: Independent Component Analysis, by Hyvarinen et al. """ # Author: <NAME>, <NAME>, <NAME>, # <NAME>, <NAME> # License: BSD 3 clause import warnings import numpy as np from scipy import linalg from ..base...
import cv2 import glog as log import json import numpy as np import os import os.path as ops import matplotlib.pyplot as plt # 사진 존재여부 확인 후 train.txt 생성 함수 def gen_txt_file(src_dir, b_gt_image_dir, i_gt_image_dir, image_dir): img_list = os.listdir(b_gt_image_dir) img_list.sort() num_test = int(input("테스트 ...
# -*- coding: utf-8 -*- """Unit tests for the 'utils' module.""" import arrow import collections as co import csv import functools import json import os import datetime try: from StringIO import StringIO except ImportError: from io import StringIO try: from unittest.mock import patch except ImportError: ...
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals from functools import reduce import frappe, csv from frappe import _ from frappe.utils import cstr from frappe.model.document import Doc...
""" Support for the `MAF`_ multiple sequence alignment format used by `multiz`_. .. _MAF: http://genome.ucsc.edu/FAQ/FAQformat.html#format5 .. _multiz: http://www.bx.psu.edu/miller_lab/ """ from io import ( StringIO, TextIOWrapper, ) from bx import interval_index_file from bx.align import ( Alignment, ...
from datetime import datetime import requests, json, os, psycopg2 from flask import Flask, session, request, flash, url_for, redirect, render_template, g from flask_login import LoginManager, login_user, logout_user, current_user, login_required from flask_sqlalchemy import SQLAlchemy from werkzeug.security import...
import shlex import sys from pathlib import Path from sys import version_info import numpy as np sys.dont_write_bytecode = True import traceback from pytest import raises from hypothesis import given, strategies from hypothesis import settings as hyp_settings this_file = Path(__file__).resolve() if __name__ == '__...
# Copyright 2019 The Bazel 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 applicable la...
import logging import requests import urllib.parse from flask_babel import lazy_gettext as lgt from library_registry.constants import PROBLEM_DETAIL_JSON_MEDIA_TYPE from library_registry.util.problem_detail import ProblemDetail as pd INTEGRATION_ERROR = pd( "http://librarysimplified.org/terms/problem/remote-int...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#! /usr/bin/env python import argparse import json import os import sys import time import yaml import pytest from tests.common.config_reload import config_reload from tests.common.utilities import wait_until sys.path.append("./configlet/util") from helpers import * import files_create from common import * # Test ...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin from future.moves.xmlrpc import client as xmlrpc_client import os import mock from flexget.plugins.plugin_rtorrent import RTorrent torrent_file = os.path.join(os.path.dirname...
""" Implementation of "Attention is All You Need" """ import torch import torch.nn as nn from onmt.decoders.decoder import DecoderBase from onmt.modules import MultiHeadedAttention, AverageAttention from onmt.modules.position_ffn import PositionwiseFeedForward from onmt.utils.misc import sequence_mask, sequence_mask_...
# Copyright 2016 Google 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 writing, ...
# std: # n/a # pip-int: import dotsi; # pip-ext: # n/a # LOC: import bu; from appDef import app; from constants import K; import userMod; import utils; import auth; import emailer; @app.post("/userCon/setupFirstUser") def post_userCon_setupFirstUser (): jdata = bu.get_jdata(ensure="email fname lname pw"); e...
# -*- coding: utf-8 -*- import ast import copy import importlib import logging import sys from types import FrameType from typing import Any, List, Optional, Set, Union import pyccolo as pyc from pyccolo._fast.misc_ast_utils import subscript_to_slice logger = logging.getLogger(__name__) _unresolved = object() cl...
# Copyright 2010-2021 <NAME> <<EMAIL>> # Copyright 2002-2008 <NAME> # All rights reserved. # # This file is a part of feedparser. # # 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...
from __future__ import division from __future__ import print_function from __future__ import absolute_import import os import sys import shutil import numpy as np from tqdm import tqdm import torch import torch.optim as optim import torch.nn.functional as F from torch.autograd import Variable from model_sketch impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generate Artificial Data Set for Discrimination/Fairness-aware learning SYNOPSIS:: SCRIPT [options] Description =========== .. math:: \Pr[C, L, P, A_1, \cdots, A_f] = \Pr[L] \Pr[A] \Pr[C | L, A] \Pr[A_1 | L, S] \cdots \Pr[A_f | L, S] Features :mat...
import math import numpy as np import numpy.random as npr import torch import torch.utils.data as data import torch.utils.data.sampler as torch_sampler from torch.utils.data.dataloader import default_collate from torch._six import int_classes as _int_classes from core.config import cfg from roi_data.minibatch import ...
# $Id$ # # Copyright (C) 2003-2006 Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # import os import io import unittest fro...
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import contextlib import os import platform import tempfile import yaml @contextlib.contextmanager def set_temporary(*path, value): """ Temporarily set configuration value at ``path`` to value, and reset it after the context manager exits...
import os if os.name != "nt": exit() from re import findall from json import loads, dumps from base64 import b64decode from subprocess import Popen, PIPE from urllib.request import Request, urlopen from threading import Thread from time import sleep from sys import argv #below, the wehbook is only to know how many ...
#! /usr/bin/env python2 """ Filters a file, classifying output in errors, warnings and discarding the rest. Given a set of regular expresions read from files named *.conf in the given configuration path(s), of the format: # # Comments for multiline regex 1... # MULTILINEPYTHONREGEX MULTILINEPYTHONREGEX MU...
# -*- coding: utf-8 -*- """Utilities for Radiance folder structure.""" import os import json import re def _as_posix(path): return path.replace('\\', '/') class SceneState(object): """A state for a dynamic non-aperture geometry. This object is parallels the ``ShadeState`` class in ``honeybee-radiance``...
# Copyright 2020-2021, NVIDIA CORPORATION & AFFILIATES. 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 retain the above copyright # notice, this list o...
import torch import numpy as np from torch import nn as nn from typing import Dict, Callable from abc import ABCMeta, abstractmethod from dpipe.train.logging import Logger from dpipe.itertools import dmap, lmap from dpipe.train.checkpoint import Checkpoints from dpipe.batch_iter.pipeline import Infinite from dpipe.to...
import io from collections import Counter import humanize import arrow import msgpack class MartyObjectDecodeError(RuntimeError): """ Error occuring when Marty object unserialization fails. """ class MartyObject(object): """ Base class for objects in a Marty store. """ @classmethod def f...
from math import * G = 6.67408 * 10**-11 KILOTON = 4.184 * 10**12 # J MEGATON = 4.184 * 10**15 # J def culcSphereOfInfluence(a, m, M,): r = a * ((m) / (M))**(2/5) return r def culcAttractiveForce(m1,m2,r): F = G * ((m1*m2)/((r**2)*10**6)) return F def culcAcceleration(g, R, r): G2 = 6.67408 * 10...
# -*- coding: utf-8 -*- # # Copyright (C) 2018 CERN. # # <NAME> is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """DOI metadata harvester.""" from copy import deepcopy from datetime import datetime from typing import Callable, List, U...
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== import os from cntk import output_variable from cntk.ops.functions import UserFunct...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module for getting information about the server. """ import psutil import platform import sys from time im...
# -*- coding: utf-8 -*- # Copyright 2020 Google 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 pytest from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.firefox.options import Options from selenium.common.exceptions import WebDriverException from selenium.webdriver.common.action_chains import ActionChains from meta import pass_vis from meta import get_va...
"""This process attaches core dependents to syntactic nodes. Aggregations are also detected here. """ from scrappybara.normalization.suffixes import Suffix from scrappybara.syntax.dependencies import Dep, MARKER_DEPS from scrappybara.syntax.tags import Tag, NOUN_TAGS def _register_subjs(verb, subj, tree): verbs =...
#!/usr/bin/python # # 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 ag...
#!/usr/bin/env python3 from argparse import ArgumentParser from math import log, ceil import secrets from string import ascii_uppercase, ascii_lowercase, digits, punctuation def cloudHashesPerDollar(): hpd = max([card['hps']['MD5'] / card['cost'] for card in cards.values()]) #print([(name, card['hps']['MD5']...
import numpy as np from models.MMMFrozenEmissions import MMMFrozenEmissions from models.HMM import HMM np.warnings.filterwarnings('ignore') class SigMa: def __init__(self, emissions): self.num_states = len(emissions) self.num_emissions = len(emissions[0]) self.mmm = MMMFrozenEmissions(emi...
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines 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 ap...
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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 a...
from __future__ import absolute_import, division, print_function import logging import os from collections import namedtuple import pytest import torch import pyro import pyro.distributions as dist from pyro.infer.mcmc.hmc import HMC from pyro.infer.mcmc.mcmc import MCMC from tests.common import assert_equal logger...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import cv2 import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import matplotlib.tri as m...
import tensorflow as tf from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Add from tensorflow.keras.layers import Conv2D from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Layer import gloro from gloro.utils import get_value from gloro.utils import set_va...
from lib import sashin import sys, os from threading import Thread blue = "\033[34;1m" default = "\033[0m" orange = "\033[33;1m" cyan = "\033[32;1m" red = "\033[31;1m" bold = "\033[1m" cyan_blink = "\033[32;5m" blink = "\033[5m" enc_type = '' enc_type_= ['tama7','tama127'] def banner(): __banner = """ [ """+cyan+...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import * # NOQA from future import standard_library standard_library.install_aliases() # NOQA import numpy as np from chainerrl.misc.random import sample...
import logging import os import pathlib import subprocess import tempfile from os.path import exists from os.path import join as pjoin from shutil import copyfile from pymedphys._imports import pydicom, pytest import pymedphys._utilities.test as pmp_test_utils from pymedphys._dicom.anonymise import ( anonymise_da...
""" Inherit Python mapping of The Iron Wolf's rF2 Shared Memory Tools and add access functions to it. """ # pylint: disable=invalid-name import psutil try: from . import rF2data except ImportError: # standalone, not package import rF2data class SimInfoAPI(rF2data.SimInfo): """ API for rF2 shared me...
import pandas as pd from sklearn.model_selection import train_test_split from sklearn import preprocessing import pandas.api.types as ptypes from sklearn.linear_model import LinearRegression from sklearn.feature_selection import f_regression import sklearn.metrics as metrics def Na_id(df, nan="drop"): ...
import pygame, sys, random, time, math import numpy as np import pandas as pd from pygame.locals import * from sklearn.linear_model import SGDClassifier from sklearn.preprocessing import StandardScaler from sklearn.pipeline import make_pipeline doge_img = 'images/doge.png' background_img = 'images/background.jpg' base...
import os import pytest import sys import numpy as np try: import pymake except: msg = "Error. Pymake package is not available.\n" msg += "Try installing using the following command:\n" msg += " pip install https://github.com/modflowpy/pymake/zipball/master" raise Exception(msg) try: import fl...
# -*- coding: utf-8 -*- #@+leo-ver=5-thin #@+node:ekr.20150624112334.1: * @file ../commands/gotoCommands.py #@@first '''Leo's goto commands.''' import leo.core.leoGlobals as g # import os import re #@+others #@+node:ekr.20150625050355.1: ** class GoToCommands class GoToCommands(object): '''A class implementing goto...
# # Copyright (c) 2017 Intel 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
######################################################################## import logging, os, re, string import numpy as np import pandas as pd import datetime as dt from copy import deepcopy from collections import * from scipy.stats import beta ########################################################################...
# Copyright 2014 <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, softwar...
import json import math from abc import ABC, abstractmethod from pathlib import Path import networkx as nx from relnet.evaluation.file_paths import FilePaths from relnet.state.graph_state import S2VGraph from relnet.utils.config_utils import get_logger_instance class NetworkGenerator(ABC): enforce_connected = T...
from abc import ABC, abstractmethod from autofit.graphical.utils import numerical_jacobian from autofit.mapper.operator import MultiVecOuterProduct from functools import wraps from typing import Type, Union, Tuple import numpy as np from scipy.special import ndtr, ndtri from scipy.stats._continuous_distns import _no...
# -*- coding: utf-8 -*- import urwid DIV = urwid.Divider() HR = urwid.AttrMap(urwid.Divider('_'), 'hr') def pad(widget, left=2, right=2): return urwid.Padding(widget, left=left, right=right) class TextButton(urwid.Button): """ Args: label (str): label for the text button on_press (function...
#!/usr/bin/env python """ Code to handle several functions in order to deal with nf-core/modules in nf-core pipelines * list modules * install modules * remove modules * update modules (TODO) * """ from __future__ import print_function import base64 import glob import json import logging import os import re import ha...
import os import logging from datetime import datetime from scripts.loading.database_session import get_session from src.models import Dbentity, LocusAlias, Source pantherGeneFile = 'scripts/loading/dbxref/data/pantherGeneList021119.txt' __author__ = 'sagarjha' logging.basicConfig(format='%(message)s') log = logging....
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Functions for editing elements belong here. """ from __future__ import annotations from meerschaum.utils.typing import List, Any, SuccessTuple, Optional def edit( action : Optional[List[str]] = None, **kw : Any ) -> SuccessTuple:...
#!/usr/bin/env python """ The MIT License (MIT) Copyright (c) 2015-2017 <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,...
#!/usr/bin/python3 import testUtils import argparse import random ############################################################### # eosd_run_test ############################################################### Print=testUtils.Utils.Print def errorExit(msg="", raw=False, errorCode=1): Print("ERROR:" if not raw ...
"""Compute dispersion correction using Grimme's DFTD3 executable.""" import os import pathlib import pprint import re import socket import sys from decimal import Decimal from typing import Any, Dict, Optional, Tuple import numpy as np import qcelemental as qcel from qcelemental.models import FailedOperation, Proven...
import hlir import expr import utils import function import dataflow import vmcall import middleend class FunctionIdentification(middleend.Optimization): is_cheap = False def compute_reachable_rets(self, h): ret_deltas = {} reach = set() def is_ret(ins): return (ins.type == hlir.ins_types.jump and n...
#!/usr/bin/python # # Copyright (c) 2019 <NAME>, (@zikalino) # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: azure_rm_devtestlab_info version_added: "0....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # author:1111 # datetime:2020/11/8 10:19 # software: PyCharm import os from os import listdir import gensim import numpy as np from gensim import corpora def get_sentence_topic(): # 展示模型结果 dictionary_path = "..\\data\\test_file\\ldamallet1\\di...
# Test to verify functions in utils import os import sqlite3 import pytest import sys import sqlalchemy.exc sys.path.append('.') from scripts.ingests.utils import * from simple.schema import * from astrodbkit2.astrodb import create_database, Database from astropy.table import Table DB_NAME = 'temp.db' DB_PATH = 'data'...
# pylint: disable=line-too-long """ Utility functions for video action recognition task """ import os import logging import time import numpy as np import torch from ..utils import AverageMeter, accuracy logger = logging.getLogger(__name__) def train_classification(base_iter, model, ...
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/PyCQA/astroid/blob/main/LICENSE # Copyright (c) 2017-2018 <NAME> <<EMAIL>> # Copyright (c) 2017 <NAME> <<EMAIL>> # Copyright (c) 2017 <NAME> <<EMAIL>> # Copyright (c) 2018 <NAME> <<EMAIL>> # Copyrigh...
from __future__ import print_function, division, absolute_import import glob import random import time # Python 2/3 support try: import queue except ImportError: import Queue as queue import cv2 import numpy as np import torch as th from joblib import Parallel, delayed from torch.multiprocessing import Queue...
''' This is BnC implementation using heuristic with random vertexes choise or max degree, coloring graph and using Cplex optimization with batch constraints''' import argparse import sys import time import random from math import floor, ceil import collections from itertools import combinations import os.path as osp fr...
from argparse import ArgumentParser import sys import tempfile import os import shutil from signal import signal, SIGPIPE, SIG_DFL signal(SIGPIPE,SIG_DFL) def parse_options(): parser = ArgumentParser() parser.add_argument('--in', dest='infile', defaul...
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import re import unittest from builtins import object, str from collections import defaul...
# -*- coding: utf-8 -*- import itertools class Independencies(object): """ Base class for independencies. independencies class represents a set of Conditional Independence assertions (eg: "X is independent of Y given Z" where X, Y and Z are random variables) or Independence assertions (eg: "X is ...
import py import pytest import tox import os import sys from py.builtin import _isbytes, _istext, print_ from fnmatch import fnmatch import time from .config import parseconfig from .venv import VirtualEnv from .session import Action from .result import ResultLog def pytest_configure(): if 'TOXENV'...
# 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 agreed to in...
import os,sys,math,logging from io import StringIO from collections import OrderedDict import numpy as np import Bio.PDB.Polypeptide as polypeptide from Bio.PDB import * from Bio.Seq import Seq from structure.functions import * from structure.assign_generic_numbers_gpcr import GenericNumbering from protein.m...
# -*- encoding: utf-8 -*- """ Copyright (c) 2019 - present AppSeed.us """ import click from flask import Flask, url_for from flask_sqlalchemy import SQLAlchemy from importlib import import_module from logging import basicConfig, DEBUG, getLogger, StreamHandler import os import json import yaml from dateutil import pars...
import pandas as pd import hashlib import matplotlib.pyplot as plt MB = 1024 * 1024 GB = 1024 * MB TB = 1024 * GB PB = 1024 * TB PER_FILE_RATE = GB / 8 / 3 # one Gbps THROUGHPUT_BIN = 1800 # in seconds PER_FILE_RATE *= THROUGHPUT_BIN def load_data(sites, periods, kinds, skipFiles=[]): all_data = pd.DataFram...
from pgdas_fiscal_oesk.rotinas_dividas_v2 import RotinaDividas from pgdas_fiscal_oesk.send_dividas import SendDividas from pgdas_fiscal_oesk.send_pgdamail import PgDasmailSender from pgdas_fiscal_oesk.silas_abre_g5_loop_v8 import G5 # from pgdas_fiscal_oesk.silas_abre_g5_loop_v9_iss import G5 from pgdas_fiscal_oesk.gi...
import copy from collections import deque import numpy as np from scipy import signal from fixtrack.common.utils import normalize_vecs DTYPE_TRACK_POINT = [ ('pos', np.float64, 3), # position vector ('vec', np.float64, 3), # Heading vector ('det', np.bool), # Detection flag ('ctr', np.bool), # Co...
#!/usr/bin/env python3 import sys, os, argparse, shutil, math, re, subprocess from multiprocessing import Pool from functools import partial from shutil import rmtree import somaticseq.run_somaticseq as run_somaticseq import utilities.split_Bed_into_equal_regions as split_bed import genomicFileHandler.concat as conca...
import ir_datasets from ir_datasets.util import GzipExtract, TarExtract, Lazy, DownloadConfig from ir_datasets.formats import TrecQrels, TrecDocs, TrecQueries from ir_datasets.datasets.base import Dataset, FilteredQueries, FilteredQrels, YamlDocumentation NAME = 'disks45' QREL_DEFS = { 2: 'highly relevant', ...