text
stringlengths
6.04k
39.5k
#!/usr/bin/env python """Plugin for HPE Cray EX machines""" # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 import logging import re import os import csv from ClusterShell.NodeSet import NodeSet from phoenix.system import System from phoenix.network import Network from phoenix.network import handleautointerfaces...
# coding=utf-8 from django import forms from django.conf import settings from django.conf.global_settings import LANGUAGES from django.utils.translation import ugettext as _ from django.utils import timezone from django.utils.text import slugify from django.contrib.auth.models import User from studygroups.utils import ...
import os import time import tensorflow as tf import numpy as np import _pickle as cpickle from sklearn import linear_model from scipy.spatial.distance import pdist import platform import subprocess import json def mlp(input_net, layers_sizes, activation=tf.nn.selu): """ Parameters: input_net - node u...
import csv import itertools import logging import re import sys import unicodedata from collections import namedtuple import networkx as nx import requests from joblib import load from numpy import isnan from sklearn.ensemble import RandomForestClassifier from yandex.Translater import Translater, TranslaterError from...
import csv import os import boto3 DATA_SET_ID = "data_set_id" DATA_SET_NAME = "name" DATA_SET_LAST_REFRESH = "last_refresh" DATA_SET_RELATIONAL_TABLE_DATA_SOURCE_ID = "relational_table_data_source_id" DATA_SET_CUSTOM_SQL_DATA_SOURCE_ID = "custom_sql_data_source_id" DATA_SET_CUSTOM_SQL_QUERY = "custom_sql_query" DATA_S...
from __future__ import print_function from six import iterkeys from builtins import str from .utilities import * from .supports import ReadablePathHandler, PathHandler, ChannelListener, ActiveSubscriberPathHandler from rejson import Path import logging import queue logger = logging.getLogger("reem") _ROOT_VALUE_READ...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013,2014,2015,2016,2017 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
import bz2 import re import sys from collections import namedtuple from pathlib import Path from xml.etree import cElementTree as ElementTree from urllib.parse import urljoin from urllib.error import URLError import mwparserfromhell import numpy import pycountry from sklearn.feature_extraction.text import CountVectori...
import networkx as nx from parse import read_input_file, write_output_file from utils import is_valid_solution, calculate_happiness, calculate_stress_for_room, convert_dictionary import sys import random from math import floor def solve(G, s): """ Args: G: networkx.Graph s: stress_budget Re...
from utils.packetCreator import * from utils.constants import * from utils.cryptomath import * from utils.codec import * from x509 import * from x509certchain import * """ Format of an SSL record Byte 0 = SSL record type Bytes 1-2 = SSL version (major/minor) Bytes 3-4 = Length of data in the record (exclu...
## #@package GameObjects # A hierarchy of prepared classes to develop games scripted in python using PyGame for 2d games and Panda3d for 3d games. # # @mainpage threeP.games # @section description Summary # A collection of scripts to ease the task of game development with the Python programming language by inte...
import copy import os from typing import Dict, Optional import SimpleITK as sitk import nibabel as nib import numpy as np from dcmstack import NiftiWrapper from nibabel.affines import apply_affine from scipy import ndimage as nd from skimage import filters, morphology from pipeline.constants import DataChannel as dc,...
import os import numpy as np import pickle import header import sys import random import numpy.matlib as npm from Quaternion import Quat import pickle import Quaternion import argparse import head_orientation_lib import saldat_head_orientation # Q is a Nx4 numpy matrix and contains the quaternions to average in the...
""" MIT License Copyright (c) 2019 <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, publish, distri...
import time from collections import defaultdict from pathlib import Path from typing import Any, ClassVar, Dict, List, NamedTuple, Optional, \ Type, Union, Tuple from nanotime import nanotime from hashkernel import LogicRegistry, dump_jsonable, load_jsonable from hashkernel.ake import NULL_CAKE, Cake, Rake, RootS...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.1.2 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # !pip install bert-tensorflow sklearn pandas tensorflo...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ This module defines objects storing results from cross-correlation analysis. """ from __future__ import print_function import numpy as np import os import pandas as pd from tunacell.io import analysis from tunacell.stats.utils import _dtype_converter class Bivariat...
# -*- coding: UTF-8 -*- """ Copyright 2012 <NAME> This file is part of w3af, http://w3af.org/ . w3af 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 version 2 of the License. w3af is distributed in the hope that...
# 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...
import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import re import seaborn as sns from matplotlib import get_backend from numba import jit from scipy.integrate import odeint, solve_ivp from numba import jit ###################...
import subprocess import os import datetime import hashlib import time import re import telebot from telebot import types __author__ = "EnriqueMoran" __version__ = "v1.3.3" TOKEN = None VERSION = None PASSWORD = None USERS = None # users.txt path LOG = None # log.txt path LOGLINES = 0 ...
# Copyright 2021 Institute of Advanced Research in Artificial Intelligence (IARAI) GmbH. # IARAI licenses this file to You 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/li...
from mypy.stubgen import (StubGenerator, find_self_initializers, FUNC, EMPTY, METHODS_WITH_RETURN_VALUE,) import sys from typing import (List, Dict, Optional) from mypy.nodes import ( # Expression, IntExpr, UnaryExpr, StrExpr, BytesExpr, NameExpr, FloatExpr, MemberExpr, # TupleExpr, ListExpr, ComparisonExpr, C...
import hashlib import json import math from pathlib import Path import tempfile from typing import Any, Dict, List, Optional, Tuple import pymusas from pymusas.spacy_api import lexicon_collection, pos_mapper, rankers # noqa: F401 from pymusas.spacy_api.taggers import rule_based, rules # noqa: F401 import spacy impo...
import torch from helper_functions import one_hot, one_hot_to_string import sys import time class Attention(torch.nn.Module): def __init__(self, encoder_dim, decoder_dim, key_dim, value_dim): super(Attention, self).__init__() self.scale_factor = torch.sqrt(torch.tensor(key_dim).float()) self.key_linear = torch....
""" Functions ending in "_command" are dynamically included in the list of commands in main.py for -h/--help/help. """ import os import re import logging as log import json from cfbs.utils import ( cfbs_dir, cfbs_filename, is_cfbs_repo, item_index, user_error, strip_right, pad_right, ge...
import functools import numpy as np import warnings import torch from ase.calculators import interface from ase.calculators.calculator import compare_atoms, PropertyNotImplementedError from hippynn.graphs import find_relatives, find_unique_relative, get_subgraph, copy_subgraph, replace_node, GraphModule from hippynn...
""" Functions for geometrical image transformation and warping. """ import sys import time import numbers from functools import wraps from collections import namedtuple import numpy as np import scipy.ndimage from scipy.signal import convolve2d from sunpy import log from sunpy.util.exceptions import warn_deprecated, ...
#!/usr/bin/env pytest ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR Memory driver functionality. # Author: <NAME> <<EMAIL>> # ############################################################################### # Copyright (c) ...
__author__ = '<NAME><<EMAIL>>' import os import sys import time import re import shlex import dbus import apt from distutils import dir_util, file_util from PyQt4 import QtGui, QtCore from PyKDE4.kdecore import KConfig from PyKDE4.kdeui import KGlobalSettings import pexpect from .xml_tree_merge import XmlTreeMerger ...
# -*- coding: utf-8 -*- import mathutils import bpy import math import re import os import logging import mmd_tools.core.camera as mmd_camera import mmd_tools.core.lamp as mmd_lamp import mmd_tools.core.vmd as vmd from mmd_tools import utils from mmd_tools import translations class RenamedBoneMapper: def __init_...
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 2 # of the License, or (at your option) any later version. # # This program is distrib...
# Copyright (c) 2016-2021, Xilinx, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list o...
#!python3 import sys, os, time, logging, sqlite3 import types from send_email import summon_devteam import pdb this_file_dir = os.path.dirname(os.path.abspath(__file__)) method_local_dir = os.path.join(this_file_dir, 'method_local') containing_dirname = os.path.basename(os.path.dirname(this_file_dir)) from pace_util...
""" Module containing data augmentation techniques. - 3D Affine/DDF Transforms for moving and fixed images. """ from abc import abstractmethod from typing import Dict, List, Optional, Tuple, Union import numpy as np import tensorflow as tf from deepreg.model.layer import Resize3d from deepreg.model.layer_util impo...
# from KITTI Road DataSet - transform2BEV import numpy as np import cv2 as cv import os class BevParams(object): bev_size = None bev_res = None bev_xLimits = None bev_zLimits = None imSize = None imSize_back = None def __init__(self, bev_res, bev_xLimits, bev_zLimits, imSize): bev_size = (round((bev_zLimits[...
# -*- coding: utf-8 -*- # SQLAlchemy object-relational mapper from sqlalchemy import * from sqlalchemy import orm from . import Base from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.ext.orderinglist import ordering_list from .fields.hash_...
import posixpath from enum import Enum from typing import ( Optional, List, Callable, Dict, TYPE_CHECKING, ) if TYPE_CHECKING: import pyarrow from ray.util.annotations import DeveloperAPI, PublicAPI @DeveloperAPI class PartitionStyle(str, Enum): """Supported dataset partition styles. ...
''' MFEM example 10p This examples solves a time dependent nonlinear elasticity problem of the form dv/dt = H(x) + S v, dx/dt = v, where H is a hyperelastic model and S is a viscosity operator of Laplacian type. How to run: mpirun -np 4 python <arguments> Example of arguments: ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # by [jackhanyuan](https://github.com/jackhanyuan) 07/03/2022 import argparse import glob import os import re import sys import time from pathlib import Path import cv2 import acl import torch import numpy as np from PIL import Image from torchvision.ops import nms FILE...
""" Copyright 2020, CCL Forensics 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, distribute, sub...
# # Copyright (c) 2021 Wind River Systems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY ...
import struct import time import sys import pytest from fido2.attestation import Attestation from fido2.client import Fido2Client, _call_polling from fido2.ctap import CtapError from fido2.ctap1 import CTAP1 from fido2.ctap2 import ES256, AttestedCredentialData, PinProtocolV1 from fido2.hid import CtapHidDevice from f...
from flow import FlowProject, directives import templates.ndcrc import warnings warnings.filterwarnings("ignore", category=DeprecationWarning) class Project(FlowProject): pass @Project.operation @Project.post.isfile("ff.xml") def create_forcefield(job): """Create the forcefield .xml file for the job""" ...
""" **utils** module provide a set of generic utility functions and decorators, which are not data-related (data manipulation utility functions should go to **datautils**). important This module can be imported by any other module (especially framework integration modules), therefore, it should have as few ext...
""" Plot results Author(s): <NAME> (<EMAIL>) """ import os import numpy as np from sklearn.manifold import TSNE from sklearn.decomposition import PCA from sklearn.preprocessing import MinMaxScaler from sklearn.metrics import pairwise_distances from matplotlib import pyplot as plt from matplotlib import cm import mat...
import cv2 import random import numpy as np import torch # helper -- # def make_grid_image(width, height, grid_size = 16): # image = np.zeros((height, width), np.float32) # for y in range(0, height, 2 * grid_size): # for x in range(0, width, 2 * grid_size): # image[y: y + grid_size, x:x + ...
import csv import h5py import os import math import re d2r = math.pi / 180.0 # empty class we'll fill in with data members # class Record: pass (deprecated) def load(h5_filename): filepath = h5_filename flight_dir = os.path.dirname(filepath) # open the hdf5 file data = h5py.File(filepath, 'r') ...
"""Dynamical system representation in first-order logic. References ========== <NAME> "The temporal logic of actions" ACM Transactions on Programming Languages and Systems (TOPLAS), Vol.16, No.3, pp.872--923, 1994 <NAME> "The temporal semantics of concurrent programs" Theoretical Computer Sci...
#!/usr/bin/python3 #--- coding:utf-8 import time, sys, os from IPython import embed import numpy as np import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D class Kmeans(): def __init__(self, n_clusters, max_iter = 1000, tol = 0.00001): ...
""" The BIGMACC script. """ import os import pandas as pd import numpy as np import logging import xarray as xr import zarr from itertools import repeat import time import cea.utilities.parallel logging.getLogger('numba').setLevel(logging.WARNING) import cea.config import cea.utilities import cea.inputlocator import c...
#!/usr/bin/env python3 """Inizializza il database caricando opportuni dati nel database""" import os import random import urllib.parse from datetime import datetime, date, timedelta from sqlalchemy import create_engine from sqlalchemy.sql import select from sqlalchemy.sql.expression import func from werkzeug.securit...
from flask import Flask, Response, jsonify, request import requests from config import AVRO_SCHEMA_LOC, IDENTITY_SERVER_SETTINGS, DATA_DICTIONARY_SERVER_SETTINGS, EVENTHUB_CONFIG, HOST_CONFIG,DELETE_USER, PERSONICLE_SCHEMA_API import json import os from producer import send_records_azure, send_datastreams_to_azure from...
import gc import logging import math import os import warnings from typing import Iterator, List, Optional, Tuple import fastcluster import joblib import numba as nb import numpy as np import pandas as pd import scipy.cluster.hierarchy as sch import scipy.spatial.distance as ssd import spectrum_utils.utils as suu impo...
# -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '../private')) sys.path.append(os.path.join(os.path.dirname(__file__), '../common')) sys.path.append(os.path.join(os.path.dirname(__file__), '../XM')) import numpy as np import pandas as pd import matplotlib.pyplot a...
import json import sys import os import argparse from ibm_watson import AssistantV1 from ibm_cloud_sdk_core.authenticators import IAMAuthenticator class ArgParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) def...
import os import sys import tensorflow as tf import numpy as np import math import matplotlib as mlp import copy import random import tqdm BASEDIR = os.path.join(os.path.dirname(__file__), '..') sys.path.insert(0, BASEDIR) from Dataset.load import Load from Parser_.parser import model_parser from Dataset.save_resul...
from __future__ import with_statement import subprocess import unittest import sys import os import imp from tempfile import mkdtemp from shutil import rmtree import mozunit from UserString import UserString # Create a controlled configuration for use by expandlibs config_win = { 'AR_EXTRACT': '', 'DLL_PREFIX'...
""" Custom Controllers for GIMS License: MIT """ import json from gluon import Field, HTTP, SQLFORM, URL, current, redirect, \ CRYPT, IS_EMAIL, IS_EXPR, IS_NOT_EMPTY, IS_NOT_IN_DB, IS_LOWER, \ A, BR, DIV, H3, H4, I, INPUT, LI, TAG, UL, XML from gluon.storage import Storag...
# -*- coding: utf-8 -*- """ Created on Thu Apr 2 16:21:39 2015 @author: ajaver """ # -*- coding: utf-8 -*- """ Created on Fri Mar 13 19:39:41 2015 @author: ajaver """ import json import os import cv2 import numpy as np import pandas as pd import tables from tierpsy.analysis.ske_create.helperIterROI import generat...
import web import jinja2 import os import datetime from unichain import Grade from unichain import Course from unichain import Student from unichain import Teacher import unichain import webbrowser # Given a specifically formatted string, parse it to create a list of categories and weights for a course def parseCatego...
import logging try: from openbabel import pybel # ob 3.0.0 except ImportError: # ob 2.4 import pybel import re import numpy as np import pandas as pd import pymongo from bson.objectid import ObjectId from rdkit import Chem from rdkit.Chem import rdFMCS from aqc_utils.helper_classes import config from aqc_uti...
# Copyright 2021 <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, softw...
import time import logging from collections import defaultdict import simpy import numpy as np from tqdm.auto import tqdm import RideSimulator.reward_parameters as rp from RideSimulator.Driver import Driver from RideSimulator.Grid import Grid from RideSimulator.State import State from RideSimulator.Trip import Trip f...
import re MIN_BARS = 15 GRAMMAR_CHARACTERS = "zabcdefgABCDEFG23468T-^=_,></'|" # region REGULAR EXPRESSION OBJECTS # region --- Grammar Generation APOSTROPHE_RE = re.compile('[’`´]') SEMICOLON_RE = re.compile(';') BARLINES_RE = re.compile('(\|]+)|(\[+\|)|(\|!\|)') REPEATS_RE = re.compile(':\|*:+') END_1_RE = re.compi...
import re import math def fib_indexes_program(): count = int(input()) for i in range(0, count): current = int(input()) print(str(fib_index(current)) + ' ') def read_list_by_count(): input_list = [] input() for i in input().split(): input_list.append(float(i)) return i...
import json import os import pickle import random import numpy as np import torchvision.transforms as transforms from PIL import Image from sklearn.metrics import roc_auc_score from torch.utils.data import Dataset, DataLoader def unpickle(file): import _pickle as cPickle with open(file, 'rb') as fo: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: <NAME> # @Date: 2020-03-03 # @Filename: bhm_aqmes.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) # isort: skip_file import peewee from peewee import JOIN from peewee import fn from astropy.io import fits import pkg_resources f...
import frappe import datetime import time from frappe.utils import getdate, get_time, flt from datetime import datetime, timedelta from frappe import utils from frappe import throw, msgprint, _ from club_crm.api.wallet import get_balance from club_crm.club_crm.doctype.cart.cart import add_cart_from_spa_online from club...
import sys, os import re import math import datetime as dt import numpy as np from scipy import stats import urepr from loguniform import LogUniform, ModifiedLogUniform from kumaraswamy import kumaraswamy # CONSTANTS mjup2mearth = 317.8284065946748 # 1 Mjup in Mearth template_setup = """ [kima] GP: false G...
# -*- coding: utf-8 -*- # Copyright 2018 University of Groningen # # 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 appli...
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
import os import numpy as np import h5py import sqlite3 import sys from datetime import datetime as dt from multiprocessing import Process, Lock, BoundedSemaphore from GCR import GCRQuery import GCRCatalogs import lsst.sims.photUtils as sims_photUtils from lsst.sims.catUtils.dust import EBVbase from . import sqlite_...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
from distutils.log import debug from itertools import count import os, sys, getpass, re, subprocess from time import ctime, time, sleep from pythonping import ping address_list = [] custom_address_list = [] user = getpass.getuser() reg_timeout = re.compile("Request timed out") reg_reply = re.compile("Reply from") def...
import logging import os import numpy as np import networkx as nx from hytra.pluginsystem.plugin_manager import TrackingPluginManager import hytra.core.probabilitygenerator as probabilitygenerator import hytra.core.jsongraph from hytra.core.jsongraph import negLog, listify, JsonTrackingGraph from hytra.util.progressbar...
#-*- coding: utf-8 -*- from __future__ import print_function import os import time import sys import copy sys.path.append("python") from model import Seq2Seq_chatbot from data_reader import Data_Reader import data_parser import config import re # from gensim.models import KeyedVectors from rl_model import PolicyGra...
import os import sys import time from pathlib import Path from typing import List import numpy as np import pandas as pd from sklearn.model_selection import StratifiedKFold import thoipapy.utils from thoipapy import utils from thoipapy.validation.auc import calc_PRAUC_ROCAUC_using_10F_validation from thoipapy.ML_mode...
''' Helper functions to read through raw data for each corpus. Each is a generator that yields a single dataset and metadata in the form: { 'df' 'locator', 'dataset_id' } ''' import os from os import listdir from os.path import join from collections import OrderedDict import argparse import gzip import js...
# + import re from itertools import chain # regex to remove console python marks RE_CONSOLE_PY = re.compile('\>\>\> ?|\.\.\. ?') # - # # ExampleParser class ExampleParser(): """ Formats examples in a numpy style docstring to markdown. Examples outputs are formatted in the language defined with the ...
""" Module with function for running in parallel and doing cleanups after runs etc. BE AWARE: This module is not completely safe for use on multiple computers with shared file system. In particular, it's not safe to start init or cleanup at the same time as anything else. @author = Joel """ import numpy as np import ...
from pytpp.features.objects import Objects from pytpp.features.folder import Folder from pytpp.features.client_groups import ( Agentless, EstCertificateEnrollment, VenafiAgent ) from pytpp.features.client_work import ( AgentConnectivity, AgentUpgrade, CertificateDevicePlacement, CertificateDiscovery, Certif...
import numpy as np import pandas as pd from scipy.stats import poisson import logproj.stat_time_series as ts from logproj.P1_familyProblem.part_classification import returnsparePartclassification # %% SIMULATE INVENTORY FUNCTION def returnProbabilisticInventory(I_t, iterations=30): ''' Parameters ------...
# -*- coding: utf-8 -*- """ Created on Sun Jan 13 21:52:16 2019 @author: <NAME> """ import time from financepy.finutils.FinTestCases import FinTestCases, globalTestCaseMode from financepy.products.credit.FinCDS import FinCDS from financepy.finutils.FinMath import ONE_MILLION from financepy.market.curves.FinInterpolate...
""" Functionality for generating Python code used to evaluate monomial polynomials. """ from polynomials_on_simplices.algebra.multiindex import generate_all from polynomials_on_simplices.generic_tools.code_generation_utils import CodeWriter from polynomials_on_simplices.generic_tools.str_utils import ( split_long...
from pandac.PandaModules import loadPrcFileData loadPrcFileData('', 'win-size 640 480') # Window size loadPrcFileData('', 'win-fixed-size #t') # Window is a fixed size loadPrcFileData('', 'textures-auto-power-2 1') loadPrcFileData('', 'textures-power-2 up') loadPrcFileData('', 'load-file-type p3assimp') from di...
#!/usr/bin/env python import sys, os, subprocess, re, platform from subprocess import PIPE, Popen from os.path import exists TOOLS_DIR = "./tools" DAFNY_PATH = "./tools/dafny/dafny" VALE_PATH = "./tools/vale/bin/vale" DAFNY_LIB_DIR = "./std_lib" DAFNY_LIB_HASH = "84d160538b6442017a5401feb91265147bf34bfc" DAFNY_ZIP_...
import numpy as np from Bio import Phylo tavgii, davgii, tsqii, dtavgii, dsqii, sii = 0,1,2,3,4,5 def base_regression(Q, slope=None): """ this function calculates the regression coefficients for a given vector containing the averages of tip and branch quantities. Parameters ---------- Q :...
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.runner import force_fp32 from mmdet.models.roi_heads.bbox_heads import ConvFCBBoxHead from mmdet.core import bbox_target_rbbox, rbbox_target_rbbox,choose_best_Rroi_batch, hbb2obb_v2, multiclass_nms_rbbox from mmdet.models.losses import accura...
from abc import ABC import torch from torch import nn from torch.utils.data import Dataset from transformers import BertTokenizer, BertModel, BertConfig, AdamW, get_scheduler import argparse from tqdm import tqdm import numpy as np import fairscale import random # Read and Concatenate all data (2*1024=2048 sequences ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Colony Framework # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Colony Framework. # # Hive Colony Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apach...
import numpy as np import pandas as pd from tqdm import tqdm import matplotlib.pyplot as plt from scipy.optimize import minimize from PIL import Image from pims_nd2 import ND2_Reader as nd2_opener from os import listdir from os.path import isfile, join import warnings import sys def Num_to_Str(_i): ...
# -*- coding: utf-8 -*- from __future__ import annotations import time from contextlib import suppress from datetime import datetime from functools import partial from threading import Thread from typing import Any from typing import cast from typing import Optional from typing import Type from msgspec.json import de...
#!/usr/bin/python # ex:set fileencoding=utf-8: from __future__ import unicode_literals from django.apps import apps from django.contrib.contenttypes.models import ContentType from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse_lazy from...
# vim:ts=4:sts=4:sw=4:expandtab """Useful additions to the standard Python class hierarchy. """ __all__ = ( 'Object', 'Argument', 'ArgumentMode', 'ArgumentError', ) from inspect import getargspec from sys import _getframe import types class Namespace(dict): """A dictionary whose elements can be accessed a...
# coding=utf-8 # Copyright 2021 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 python3 import os import sys import argparse import configparser import signal import time from datetime import datetime, timedelta import json import csv import glob #---------------------------------------- def pause(question='PRESS ENTER TO CONTINUE ...'): """ pause for debug purposes """ gl...
import os import numpy as np from obspy.core.inventory.response import InstrumentSensitivity, PolesZerosResponseStage from obspy.core.inventory.util import Frequency import instResp from instResp.libInst import get_corner_freq_from_pole, getResponse from instResp.libNom import RC, WA, Accelerometer from instResp.plot...
import numpy as np import pandas as pd from json import JSONDecoder, JSONDecodeError # for reading the JSON data files import re # for regular expressions import os # for os related operations # Hyperparameters num_classes = 1 num_features = 14 # number of 'color' channels for the input 1D 'image' time_steps = 60 #...
# =============================================================================== # Copyright 2012 <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/...