text
stringlengths
6.04k
39.5k
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 <NAME> <yamahata at private email ne jp> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
# -*- coding: utf-8 -*- import os import random import string import sphinx from sphinx.errors import SphinxError from docutils import nodes from docutils.parsers.rst import directives from pkg_resources import parse_version from sphinx.roles import XRefRole from sphinxcontrib.needs.directives.need import Need, NeedD...
from collections import Counter, Iterable, defaultdict from itertools import chain, islice, product from warnings import warn import Bio.Data.CodonTable import numpy as np from Bio.Seq import Seq # create the genetic_codes and codons_for_aa dicts genetic_codes = {} codons_for_aa = {} synonymous_codons = {} for code_...
from abc import abstractmethod from urllib3.util.url import Url, parse_url from requests import session from kong.structures import ApiData, ServiceData, ConsumerData, \ PluginData, RouteData, TargetData, UpstreamData from kong.exceptions import SchemaViolation class RestClient: # pylint:disable=too-few-public-m...
# *** TITLE VERSION *** VERSION = "Terminus v1.3.0" # font BIG, two spaces between name and ver: http://patorjk.com/software/taag/#p=display&f=Big&t=Terminus%20%20v1.3.1 TITLE = """ _______ _ __ ____ ___ |__ __| (_) /_ | ...
import warnings import networkx as nx import numpy as np import scipy.sparse as sp from sklearn import metrics class DataUtils: def __init__(self, graph_file): with np.load(graph_file, allow_pickle=True) as loader: loader = dict(loader) self.A = sp.csr_matrix((loader['adj_data'], l...
# -*- coding: utf-8 -*- """ @author: Blopa """ from city_cards import city_cards from Game import Game,Player,PlayerRole,TurnPhase,GameState from Players import RandomPlayer,HeuristicPlayer,PlanningPlayer import http.server as BaseHTTPServer import socketserver as SocketServer import hashlib import json import os im...
import itertools import random from collections import defaultdict, namedtuple import asyncpg import discord from discord.ext import commands from more_itertools import partition from utils import cache, db, disambiguate, formats from utils.commands import command_category, walk_parents from utils.converter import Bo...
from enum import Enum import socket from typing import Dict import airtouch3.constants as const from airtouch3.helper import ( calculate_checksum, bit8_in_byte_on, bit7_in_byte_on ) class AT3AcMode(Enum): AUTO = 0 HEAT = 1 DRY = 2 FAN = 3 COOL = 4 def __str__(s...
#!/usr/bin/env python # epics/wx/utils.py """ This is a collection of general purpose utility functions and classes, especially useful for wx functionality """ import wx import wx.lib.masked as masked import os import array import six if six.PY3: maketrans = str.maketrans else: from string import maketrans BA...
import os import secrets from PIL import Image from datetime import datetime from flask import render_template, redirect, url_for, request, flash, session, abort from coolhr import app, db, mail from coolhr.forms import * from coolhr.email import send_welcome_email, send_password_reset_email, send_company_username_emai...
# Copyright 2018-2021 Xanadu Quantum Technologies 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...
"""rio_tiler.utils: utility functions.""" import os from io import BytesIO from typing import Any, Dict, Generator, Optional, Sequence, Tuple, Union import numpy from affine import Affine from boto3.session import Session as boto3_session from rasterio import windows from rasterio.crs import CRS from rasterio.enums i...
""" Exemplo de Jogo com Python/Pygame Programs Baseado no site: http://programarcadegames.com/ http://simpson.edu/computer-science/ """ import pygame, random, sys, math # Define some colors # R G B BLACK = ( 0, 0, 0) GRAY = (100, 100, 100) NAVYBLUE = ( 60, 60, 100) WHITE = (255, 255,...
#**************************************************************************** #* riscv_debug_bfm.py #* #**************************************************************************** from enum import Enum, auto, IntEnum import core_debug_common as cdbgc from core_debug_common.stack_frame import StackFrame import pybfms ...
# Copyright 2020 Canonical 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 agreed to in writing, s...
# -*- coding: utf8 -*- '''This module implements techniques derived from the pGlyco2 FDR estimation procedure described in: [1] <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., … <NAME>.-Y. (2017). pGlyco 2.0 enables precision N-glycoproteomics with comprehensive quality control and one-step mass spectrom...
""" Some old methods rescued from crystal.py """ import logging import pokemontools.pointers as pointers from pokemontools.crystal import ( rom_interval, old_parse_xy_trigger_bytes, parse_script_engine_script_at, calculate_pointer_from_bytes_at, parse_text_engine_script_at, # constants s...
import functools try: import megengine as torch import megengine.module as nn import megengine.functional as F use_mge = True print('You are Using Megengine as Network backend...') except: import torch import torch.nn as nn import torch.nn.functional as F use_mge = False # print...
"""Implementation of HjsonDecoder """ from __future__ import absolute_import import re import sys import struct from .compat import fromhex, b, u, text_type, binary_type, PY3, unichr from .scanner import HjsonDecodeError # NOTE (3.1.0): HjsonDecodeError may still be imported from this module for # compatibility, but i...
from evoplotter import utils from evoplotter import plotter from evoplotter import printer from evoplotter import reporting from evoplotter.dims import * def produceHeader(): def fun(p): return False # method gp gp gpprior gpprior gps gps gpsi gpsi lex lex lexprior lexprior # lexs lexs lexsi le...
import gym import time import numpy as np from absl import flags import sys, os import torch from abp.adaptives.sadq.adaptive_decom import SADQAdaptive from abp.adaptives.mb_ts.adaptive_grid import MBTSAdaptive from abp.utils import clear_summary_path from abp.explanations import PDX from tensorboardX import SummaryWr...
from __future__ import annotations import json from typing import NamedTuple, Tuple, TYPE_CHECKING import re import h5py import datetime from dataclasses import dataclass import logging from dictor import dictor from dat_analysis.dat_object.attributes.dat_attribute import DatAttribute import dat_analysis.hdf_util as ...
""" This is file contains tools for mass calibration process. @author: <NAME> <<EMAIL>> """ import os import numpy as np from scipy.signal import find_peaks, peak_widths import matplotlib.pyplot as plt import math from scipy.optimize import curve_fit from mpl_toolkits.mplot3d import Axes3D from scipy import interpolat...
import numpy as np import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import BatchNormalization, Conv2D, Dense, Input, MaxPooling2D, ReLU, UpSampling2D from src.utils.imaging import resize_bilinear_nearest_batch class ResnetBlock(tf.keras.layers.Layer): def __init__(self, ker...
############################################################################## # Copyright 2016-2017 Rigetti Computing # # 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...
# bayesAgents.py # -------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.e...
import pytest import copy from yggdrasil import tools, platform, constants from yggdrasil.components import import_component from yggdrasil.drivers.ConnectionDriver import ConnectionDriver from yggdrasil.communication import new_comm, CommBase from tests import timeout_decorator from tests.drivers.test_Driver import Te...
# Copyright (c) Microsoft Corporation. All rights reserved. # # MIT License # # 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 u...
import unittest import numpy import pytest import cupy from cupy._core.internal import prod from cupy import cusolver from cupy.cuda import driver from cupy.cuda import runtime from cupy.linalg import _util from cupy import testing from cupy.testing import _condition import cupyx def random_matrix(shape, dtype, sca...
# import matplotlib # matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np import plotly.express as px import plotly.graph_objects as go from dash.exceptions import PreventUpdate from matplotlib import ticker from matplotlib.backends.backend_pdf import PdfPages from matplotlib.ticker import EngForm...
from _cihub.db import StatusEnum from _cihub.db import ci_status from requests.auth import HTTPBasicAuth from sqlalchemy.sql import select import copy import json import pytest jenkins_success_data = { 'build': {'artifacts': {}, 'full_url': 'https://test.url/job/test_name/2342/', 'log': '', 'no...
# fileset.py - file set queries for mercurial # # Copyright 2010 <NAME> <<EMAIL>> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import re from .i18n import _ from . import ( error, ...
# preferences.py # # MIT License # # Copyright (c) 2020 <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 us...
# Copyright 2019 GreenWaves Technologies, SAS # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to i...
#<NAME>, <NAME> et <NAME> # coding: utf-8 from tkinter import Tk from tabulate import tabulate from function import * from tkinter import * import os ############################## Liste de variables utiles ######################### ###### Variables utilisées pour les premiers boutons qui apparaissent ch...
""" AbaqusThermal.py For use with Abaqus 6.13-1 (Python 2.6.2). Created by <NAME> <<EMAIL>> - Includes modules which generate loading conditions for thermal related concepts. """ import logging from random import randint import cad_library from abaqus import * from abaqusConstants i...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, <NAME> <<EMAIL>> # Copyright: (c) 2014, <NAME> <<EMAIL>> # Copyright: (c) 2013, <NAME> <<EMAIL>> # Copyright: (c) 2013, <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import ...
import argparse import time import shutil import os import os.path as osp import csv import numpy as np import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import ReduceLROnPlateau, StepLR from data_cnn60 import NTUDataLoaders, AverageMeter, make_dir, get_cases, get_num_classes ...
import numpy as np from math import * π = np.pi import scipy.special as ss import scipy.integrate as sint import mpmath def convolve_around_center (func1, func2, N1, Nout, Δx, x_center=0): u""" Convolve two functions func1 and func2, with func1 decreasing away from 0 (convolution kernel) : (func1*func2)(x) = ∫ dx1...
#-*- coding: utf-8 -*- from datetime import datetime, date from json import load from random import choice from uuid import uuid4 from smtplib import SMTP from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication from flask import url_for fro...
import urllib.request, re, tabula, pytesseract, json, dateparser, datetime, pandas as pd, numpy as np, sys, logging, \ math from dateparser.search import search_dates from bs4 import BeautifulSoup try: from PIL import Image except ImportError: import Image from PyPDF2 import PdfFileReader from googletrans ...
import plistlib from django import forms from django.db.models import Q from realms.utils import build_password_hash_dict from .app_manifest import build_enterprise_app_manifest from .crypto import load_push_certificate from .declarations import update_blueprint_declaration_items from .dep import decrypt_dep_token from...
import numpy as np import pandas as pd from math import isclose div_series = pd.read_csv("data/divisions.csv",index_col=0,squeeze=True) div_series.name = None teams = sorted(list(div_series.index)) tol = .0001 reverse_dict = {'Win':'Loss','Loss':'Win', 'Tie':'Tie'} def get_outcome(row): s = row["Points_scored"...
""" Boundary Attack++ """ import logging import numpy as np import tensorflow as tf from cleverhans.attacks import Attack from cleverhans.model import CallableModelWrapper, Model, wrapper_warning_logits from cleverhans import utils, utils_tf np_dtype = np.dtype('float32') tf_dtype = tf.as_dtype('float32') _logger = u...
import math import numpy as np import collections import copy import decimal decimal.getcontext().prec = 58 def is_prime(x): """ Checks if x is prime """ if x <= 1: return False for i in range(2, round(math.sqrt(x)) + 1): if x % i == 0: return False else: ret...
""" Functions for common path, file and folder manipulation. """ import errno import os import pathlib import shutil import stat import time import webbrowser from typing import Optional, List import dlpt FILE_FOLDER_REMOVE_RETRY_DELAY_SEC = 0.5 class ChangeDir: def __init__(self, path: str): """ Tempo...
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2006-2010, <NAME> <<EMAIL>> # Copyright 2018, <NAME> <<EMAIL>> ''' Control Point ============= :class:`DeviceQuery` -------------------- A convenient class that allow us to create request queries t...
from __future__ import print_function import sys import os import pickle import argparse import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision.transforms as transforms import numpy as np from torch.autograd import Variable import cv2 import torch.utils.data as data from layers.funct...
import time import logging import numpy as np import emcee import os import sys sys.path.insert(0, os.getcwd()) import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from scipy import optimize from utils.utils import preprocessing from models.configs import configs from pybnn.b...
import os import sys import time import numpy as np import json import torch import torch.nn as nn import torch.nn.functional as F import torch_geometric from torch_geometric.nn import (NNConv, GMMConv, GraphConv, Set2Set) from torch_geometric.nn import (SplineConv, graclus, max_pool, max_pool_x, global_mean_pool) #f...
''' Generic Interface classes for HLTAPI-based TGEN devices. ''' __all__ = ( 'Interface', 'PhysicalInterface', 'EthernetInterface', 'PosInterface', 'AtmInterface', 'EmulatedInterface', 'VirtualInterface', 'SubInterface', ) import abc from enum import Enum from genie.decorator impo...
# Copyright 2019 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...
#<NAME> 2016 import pygame, sys, time from pygame.locals import * import random import math #constants #player and ball sizes are radius PLAYER_SIZE=22 BALL_SIZE=10 FIELD_LENGTH=1000 FIELD_WIDTH=500 GOAL_SIZE=280 #Classes #ball has velocity and position class ball(): def __init__(self, pos=None...
# -*- encoding: utf8 -*- from ..benchmark import * from .partition_shape_experiment import * from ..cluster import * from ..util import * import lue # from ..plot.scale.square_root import SquareRootScale import dateutil.relativedelta import dateutil.parser import matplotlib # matplotlib.use("PDF") matplotlib.use("Ag...
import re from functools import partial from chef.datastructures import Recipe, IngredientProperties,\ Ingredients, unknown, undefined from chef.validators import validate_title, validate_ordinal_id_suffix,\ validate_measure_type, validate_cooking_time, validate_time_declaration from chef.errors import...
#!/usr/bin/env python3 __doc__ = \ """The Developmental Cognition and Neuroimaging (DCAN) lab Macaque fMRI Pipeline [1]. This BIDS application initiates a functional MRI processing pipeline built upon the Human Connectome Project's minimal processing pipelines [2]. The application requires only a dataset conformed t...
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import json import pickle import datetime from pathlib import Path from dataclasses import dataclass, field, asdict, fields from typing import List, Union, Iterable from seir.argparser import DataClassArgumentParser from seir...
#!/usr/bin/env python3 """ Performance.py: Performance testing utility for Graphyne; allowing the user to investigate performance and scalability of various persistence options. """ __author__ = '<NAME>' __copyright__ = 'Copyright 2016, <NAME>' __license__ = 'MIT' __version__ = '1.0.0' __maintainer__ = '<NAME...
import time import datetime start_time = time.time() date = str(datetime.datetime.now().strftime(format='%m%d')) import numpy as np import pandas as pd from sklearn.ensemble import RandomForestRegressor # from sklearn import pipeline, model_selection from sklearn import pipeline, grid_search # from sklearn.fea...
""" Utility functions for the neural network and tensor manipulation of run_mtqa.py """ from __future__ import absolute_import, division, print_function import os import sys if os.name == 'nt': root_path = "/".join(os.path.realpath(__file__).split("\\")[:-2]) else: root_path = "/".join(os.path.realpath(__file...
# -*- coding: utf-8 -*- from .. import config from ..compat import theano, tt, ts, slinalg, floatX from .._constants import * from .utils import * import numpy as np from scipy.linalg import block_diag as scipy_block_diag import scipy from scipy.sparse import issparse, csr_matrix __all__ = ["lazy_math", "greedy_math",...
from flask import Blueprint, request, redirect, g, abort, jsonify, session from piipod.views import current_user, login_required, url_for, requires, current_user, current_url from .forms import GroupForm, GroupSignupForm, ProcessWaitlistsForm, \ ImportSignupsForm, SyncForm, ConfirmSyncForm, DeleteEventsEnMasse from...
# coding=utf-8 # Copyright 2018 The Hypebot 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...
import os import tempfile import re import unittest import k3proc import k3ut import skimage import skimage.io from skimage.metrics import structural_similarity as ssim import k3down2 dd = k3ut.dd this_base = os.path.dirname(__file__) class TestTex(unittest.TestCase): def _clean(self): pass def ...
"""Figure based on Open3D's visualizer.""" import numpy as np import open3d as o3d from .. import rotations as pr from .. import transformations as pt from .. import trajectories as ptr from ._artists import (Line3D, Frame, Trajectory, Camera, Box, Sphere, Cylinder, Mesh, Ellipsoid, Capsule, Cone...
############################################## # SYNCMD Creation ############################################## # # Processing Steps: # make_specgrid # make_sedgrid # # Notes # 1)Import assumptions (filters, avg DM) are set in DATAMODEL ITEMS block # 2) Code defaults to overwriting output files # # Example # import run...
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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 version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
from __future__ import absolute_import import sys from anyjson import dumps from datetime import datetime from celery import __main__ from celery.platforms import EX_FAILURE, EX_USAGE, EX_OK from celery.bin.base import Error from celery.bin.celery import ( Command, list_, call, purge, result, ...
from .discriminators import * from .neurons import * import random import numpy as np import math import json import sys import operator import logging from collections import OrderedDict # Adjust level to DEBUG to get more information logging.basicConfig( filename="wcds.log", filemode="w", format='%(asct...
# Copyright © 2020 Red Hat 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 writin...
""" Detonation cell size estimation functions, based on the work of Shepherd et al: http://shepherd.caltech.edu/EDL/PublicResources/sdt/nb/sdt_intro.slides.html A description of the theory, numerical methods, and applications are described in the following report: Numerical Solution Methods for Shock and Detonati...
""" fftmap library: This library can be used to create 2D maps. Map here means a large "virtual" array of floating point numbers, which is virtual in the sense that the array is filled procedurally, block by block, as needed. The map can be defined to contain different spatial frequencies in diffe...
import cv2 as cv import numpy as np import os def lines_crossed(line1, line2, mode=1): ''' mode: 1、直线与直线 2、直线与线段 ''' if line1 == None or line2 == None: return False, (0, 0) point_is_exist = False x = y = 0 # line1 = [int(i) for i in line1] # line2 = [int(i) for i in l...
# BSD 3-Clause License # # Copyright (C) 2021 THL A29 Limited, a Tencent company. 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 copyrig...
import glob import tensorflow as tf AUTO_TUNE = tf.data.experimental.AUTOTUNE ALL_MASK_TYPES = ['single_bbox', 'bbox', 'free_form'] GENERATOR = tf.random.Generator.from_seed(1) class RandomMaskLoader: def __init__(self): pass @staticmethod def trapez(y, y0, w): return tf.clip_by_value(t...
# -*- coding: utf-8 -*- """ Created on Sun Oct 21 13:19:50 2018 @author: a002028 """ import time import numpy as np import pandas as pd import zipfile # from pprint import pprint from bokeh.models import ColumnDataSource, CustomJS, WidgetBox, LinearAxis, Spacer # , LabelSet, Slider from bokeh.layouts im...
# -*- coding: utf-8 -*- """ dom object ~~~~~~~~~~ TODO: explain this :) """ import re from UserList import UserList from orgmode.liborgmode.base import MultiPurposeList, flatten_list # breaking down tasks regex REGEX_SUBTASK = re.compile(r'\[(\d*)/(\d*)\]') REGEX_SUBTASK_PERCENT = re.compile(r'\[(\d*)%\]') # he...
#!/usr/bin/env python #For use with Python 3. import re import sys import os import argparse from subprocess import Popen,PIPE from time import sleep import datetime #Extract Sample, SRA and genome info from config file. Sample data will be stored as a dictionary with sample ID as keys and a list of SRA accessions a...
# coding=utf-8 """ Comparisons to set up and run in NEURON using `hoc_files` Each comparison is called via the `nrnpy.start` method. Thus, comparisons require arguments for `filename` and `param_list` (wthe structure of which can be different for each method) """ import numpy as np from neuron import h from src.util...
import os from astropy.io import fits from . import interpolator from . import modspeclist from .. import axe_asciidata from ..axeerror import aXeSIMError from ..axeutils import getDATA, getSIMDATA, getOUTSIM class TemplateSpectrumList: """Class for the template spectra""" def __init__(self, inlist, incat,...
import re from flask import Flask, request, redirect, render_template, url_for, jsonify import json import dataconnector import icdservice import datetime from datetime import datetime, timedelta import json app = Flask(__name__) app.config['SQL_HOST'] = 'localhost' app.config['SQL_CRED'] = {'USR': '', 'P...
import pandas as pd import numpy as np from tqdm.auto import tqdm from scipy import * from scipy.sparse import * from pathlib import Path from features.compute_editdistance import compute_editdistance from features.compute_jaro_winkler_distance import compute_jaro_distance from features.target import target import os ...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 version 3 of the Lic...
""" Settings for atmosphere project. """ from __future__ import absolute_import, unicode_literals from datetime import timedelta from uuid import UUID import logging import sys from dateutil.relativedelta import relativedelta from celery.schedules import crontab import os import os.path import threepio import atmosph...
import socket import time, threading import tkinter as tk import tkinter.ttk as ttk import numpy as np import struct from queue import Queue from PIL import ImageTk, Image import robot import psutil import io import sys import math import cv2 as cv np.set_printoptions(threshold=sys.maxsize) from threading import Thread...
import os import sys import pymel.core as pm import lct.src.core.lcBake as lcBake import lct.src.core.lcColor as lcColor import lct.src.core.lcConfiguration as lcConfiguration import lct.src.core.lcGeometry as lcGeometry import lct.src.core.lcPath as lcPath import lct.src.core.lcPlugin as lcPlugin import lct.src.core...
import os import sys import signal import header import commandParser as _command_parser import fescriptManager import socket as s import json import shutil import time from colorama import init init() from colorama import Fore,Back from processManager import _process_mode,FE_PROCESS_MANAGER from function...
#!/usr/bin/env python """ :mod:`disco.worker.classic.worker` -- Classic Disco Runtime Environment ======================================================================= When a Job is constructed using the classic :class:`Worker` defined in this module, Disco runs the :mod:`disco.worker.classic.worker` module for ever...
import numpy as np import pandas as pd import pandas.util.testing as tm import unittest try: from timeseriescv.cross_validation import (BaseTimeSeriesCrossValidator, PurgedWalkForwardCV, CombPurgedKFoldCV, purge, embargo, compute_fold_bounds) except: pass try: ...
''' ############### ### DEBoost ### ############### Author: <NAME> Email: <EMAIL> LinkedIn: https://www.linkedin.com/in/wei-hao-khoong-6b94b1101 Kaggle: https://www.kaggle.com/khoongweihao Version: 0.10 Last Updated: 17/05/2020 ''' __author__ = '<NAME>: https://github.com/weihao94' import os # models import from skle...
# Copyright 2020 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, ...
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A command line interface to Gerrit-on-borg instances. Internal Note: To expose a function directly to the command line interface, name your functi...
#!/usr/bin/python3 import os, time, threading from world_state import * # world_state dictionary and constants from world import init_player, init_world, load_map_data, load_item_data, save_world_state, load_world_state from classes import Player, Object, direction from colors import * # Clear screen os.system('cls||c...
# -*- coding: utf-8 -*- # Based on ANSYS 2019R2 # Python 3.7 x64 # ---------------------------------------------------------------------------------- # | | # | Copyright © 2021 by <NAME> & <NAME> of AOT Lab in Soochow University | # | ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import torch import torch.nn as nn import math import torchvision.transforms as transforms import torchvision as tv import torchvision.models as models from torch.utils.data import DataLoader from load_utils import load_state_dict_from_url from cub_voc import CUB_VOC import...
# Copyright (C) 2016 Hewlett Packard Enterprise Development LP # 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 # # Un...
import hashlib import logging.config import logging.handlers import os import re import time from ipaddress import ip_network as str2ip from logging.handlers import SMTPHandler from xmlrpc.client import ServerProxy import requests import ujson as json import yaml from gql import Client from gql import gql from gql.tra...
"""SDL2 audio playback and recording tools. .. versionadded:: 13.5 """ from __future__ import annotations import enum import sys import threading import time from typing import Any, Callable, Dict, Hashable, Iterator, List, Optional, Tuple, Union import numpy as np from numpy.typing import ArrayLike, DTypeLike, NDAr...
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import re import struct import sys VERSION = '1.30' def _intervallist(tier): srtint = list(tier.get_intervals(sort=True)) ints = [] if tier.tier_type == 'IntervalTier': # Add empty intervals for undefined spaces if srtint and srt...