text
stringlengths
8.04k
46.5k
import csv import json import multiprocessing as mp import os import random import signal import string import sys import traceback from datetime import datetime, timedelta from itertools import repeat import nest_asyncio import numpy as np from cate.core import DATA_STORE_REGISTRY, ds from cate.core.ds import DataAcc...
# -------------------------------------------------------- # P2ORM: Formulation, Inference & Application # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- import numpy as np import os import ntpath import torch import scipy.io as s...
import platform import cv2 import timeit import argparse import os import sys import multiprocessing as mp import geopandas mp.set_start_method('spawn', force=True) import utils.dataframe import numpy as np from utils import raster_processing, to_agol, features, dataframe import rasterio.warp import rasterio.crs impo...
#!/usr/bin/python # ex:set fileencoding=utf-8: from __future__ import unicode_literals from django.contrib import messages from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q ...
#--------------------------------- utils.py file ---------------------------------------# """ This file contains utility functions and classes that support the TBNN-s class. This includes cleaning and processing functions. """ # ------------ Import statements import os import timeit import numpy as np from t...
""" Module to analyze vessel pulsatility during the heart cycle in ecg-gated CT radius change - area change - volume change Authors: <NAME> and <NAME>. Created 2019. """ import os import sys import time import openpyxl import pirt import numpy as np import visvis as vv from stentseg.utils.datahandling ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Data access functions to read from and write to the SQLite backend. Original Author: <NAME> Modifications: <NAME> """ import codecs import os import re import tempfile import sqlite3 from rstviewer.rstweb_reader import * with tempfile.NamedTemporaryFile(dir='/tmp...
#!/usr/bin/env python # Author: <NAME> (<EMAIL>) ########################## # Plotting configuration ########################## from XtDac.DivideAndConquer import matplotlibConfig # Use a matplotlib backend which does not show plots to the user # (they will be saved in files) import matplotlib matplotlib.use("Agg"...
import sys import xml.etree.ElementTree as ET import re import io import os import copy import datetime import zlib import argparse #import pdfkit from shutil import copyfile from mako.template import Template import pkgutil import polypacket import subprocess import yaml sizeDict = { "uint8" :...
import grblas import numba import numpy as np from typing import Union, Tuple from .container import Flat, Pivot from .schema import SchemaMismatchError from .oputils import jitted_op class SizeMismatchError(Exception): pass # Sentinel to indicate the fill values come from the object to which we are aligning _f...
# Copyright Contributors to the Testing Farm project. # SPDX-License-Identifier: Apache-2.0 from typing import Any, Dict, List, Optional, cast # noqa import collections import re import requests from six.moves.urllib.parse import quote as urlquote from six.moves.urllib.parse import urlencode import gluetool from g...
#!/usr/bin/env python3 from random import random, choice, seed from copy import deepcopy from math import pi from bruhat.render.sat import Expr, System, Listener from bruhat.render.front import RGBA, Compound, Translate from bruhat.render.front import path, style, canvas, color from bruhat.render.turtle import Turtl...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """This module contains the base classes that are used to implement the more specific behaviour.""" import inspect import six from cached_property import cached_property from collections import defaultdict from copy import copy from smartloc import Locato...
#!/usr/bin/env python """ Downloads Google's AudioSet dataset locally """ import argparse import atexit import collections import csv import logging.handlers import multiprocessing as mp import os import random import shutil import sys import traceback as tb import urllib.request from functools import partial import m...
from maya import cmds, mel import wave, struct import os.path, math, array, time from cmath import exp,pi class WavReader: """ This class is the responsible of managing the way the wav files open and their information """ def __init__(self, filePath): # Save the path to the ...
import numpy as np from PIL import Image from PIL import ImageFilter import matplotlib.pyplot as plt import os from itertools import permutations from IPython.display import clear_output from copy import deepcopy from collections import namedtuple # ---------------- Image utilities ---------------- def read_img(filen...
# Copyright (c) Facebook, Inc. and its affiliates. import logging import numpy as np from typing import Dict, List, Optional, Tuple import torch from torch import nn import torch.nn.functional as F from detectron2.config import configurable from detectron2.data.detection_utils import convert_image_to_rgb from detectro...
#! python # -*- coding: utf-8 -*- """ WavyTool is a simple program that allows you to acquire data from input devices, i.e microphones, and save them as file (csv, png). Also, you can perform some simple processing as spectral analysis. :authors: <NAME>, <NAME> :contact: <EMAIL>, <EMAIL> :since: 2015/02/27 """ impo...
import matplotlib.pyplot as plt import matplotlib.dates as md import matplotlib as mpl import datetime import numpy as np from matplotlib.backends.backend_pdf import PdfPages import numpy as np import sys import errno import os from collections import OrderedDict import math from readcsv import readbandwidthvalues_sel...
"""Test suite for the pytest-doctest-custom plugin.""" import re, os, sys, platform, pytest, pytest_doctest_custom pytest_plugins = "pytester" # Enables the testdir fixture PYPY = platform.python_implementation() == "PyPy" JYTHON = platform.python_implementation() == "Jython" PY2 = sys.version_info[0] == 2 SPLIT_DOC...
# BSD 3-Clause License # # Copyright (c) 2012, the Sentry Team, see AUTHORS for more details # Copyright (c) 2019, Elasticsearch BV # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Red...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License import io import json import uuid from copy import copy from datetime import timedelta from enum import Enum, unique from typing import Union, Callable import requests from requests.adapters import HTTPAdapter from ._version import V...
# 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, software # distributed under t...
import itertools from tkinter import Label, Button, StringVar, BooleanVar, DoubleVar, IntVar, Checkbutton, Tk from tkinter.ttk import Frame, Notebook, Combobox, Entry from tkinter import filedialog from tkinter import messagebox import os.path as osp import webbrowser from . import picketfence, vmat, ct, log_analyzer,...
#/u/GoldenSights import sys import traceback import time import datetime import sqlite3 import json import praw '''USER CONFIGURATION''' """GENERAL""" APP_ID = "" APP_SECRET = "" APP_URI = "" APP_REFRESH = "" # https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/ USERAGENT = "/r/Excel Clippy Office...
import logging from typing import Tuple, Any, List, Dict import torch from torch.fx.node import map_aggregate from .quantization_state import ( AutoQuantizationState, ) from .utils import ( trace_with_inputs, is_leaf, HookType, get_torch_function_hook_type, get_module_hook_type, OpQuantize...
#!/usr/bin/env python ###################################################################### # Software License Agreement (BSD License) # # Copyright (c) 2010, Rice University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that t...
# ------------------------------------------------------------------------ # Copyright (c) 2021 4669 (for eccv submission only). All Rights Reserved. # ------------------------------------------------------------------------ # Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR) # Copyri...
""" This module provides utility methods. """ import datetime import os import numpy as np import pandas as pd from matplotlib import pyplot as plt from plotnine import * from statsmodels.tsa.statespace.kalman_smoother import SmootherResults from statsmodels.tsa.statespace.mlemodel import MLEResults, MLEResultsWrapper...
""" Title: Making new layers and models via subclassing Author: [fchollet](https://twitter.com/fchollet) Date created: 2019/03/01 Last modified: 2020/04/13 Description: Complete guide to writing `Layer` and `Model` objects from scratch. """ """ ## Setup """ import tensorflow as tf from tensorflow import keras """ ## ...
"""Support for Xiaomi cameras.""" import logging import json import time import locale import base64 import requests import re import collections from os import urandom from functools import partial from urllib.parse import urlencode from datetime import datetime, timedelta from homeassistant.const import * # noqa: F...
import os import unittest from datetime import datetime from collections import OrderedDict from sqlalchemy import TEXT, BIGINT from sqlalchemy.exc import IntegrityError, SQLAlchemyError, ArgumentError from dataset import connect, chunked from .sample_data import TEST_DATA, TEST_CITY_1 class DatabaseTestCase(unitte...
# Copyright 2013, Big Switch Networks, 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 applic...
""" :py:class:`Utils` - a set of generic utilities ============================================== Usage:: # assuming that $PYTHONPATH=.../lcls2/psana # Run test: python lcls2/psana/psana/pyalgos/generic/Utils.py 1 # Import from psana.pyalgos.generic.Utils import input_single_char import psana.p...
""" A basic python script that demonstrates how to use the FST8 reader, writer, and wrapper in a purely python setting. These functions are constructed to provide a simple interface for controlling FAST programmatically with minimal additional dependencies. """ # Hacky way of doing relative imports from __future__ impo...
""" Prior class for use in pisa.core.Param objects """ from __future__ import absolute_import, division from collections import Iterable, OrderedDict from numbers import Number from operator import setitem import numpy as np from scipy.interpolate import splev, splrep, interp1d from scipy.optimize import fminbound ...
import pandas as pd import re class Formatter: """Formatting Class. This class contains method that are used for formatting the data fetched from the pickle and sent to DataFilter class """ def get_projects_details(self, projects): """Method to process all details related to project ...
import numpy as np from matplotlib import pyplot as plt from .interval import Interval class Pbox(object): def __init__(self, left=None, right=None, steps=200, shape=None, mean_left=None, mean_right=None, var_left=None, var_right=None, interpolation='linear'): if (left is not None) and (right is None): ...
# -*- mode: python; coding: utf-8 -*- # Copyright 2016-2017 the HERA Collaboration # Licensed under the BSD License. "Files." __all__ = str(''' File FileInstance FileEvent ''').split() import sys import datetime import json import os.path import re from flask import flash, redirect, render_template, url_for from s...
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2018 yutiansut/QUANTAXIS # # 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 th...
""" Customize the behavior of a fixture by allowing special code to be executed before or after each test, and before or after each suite. """ from __future__ import absolute_import import os import sys import bson import pymongo from . import fixtures from . import testcases from .. import errors from .. import lo...
""" Tests for contingency table analyses. """ import os import warnings import numpy as np import statsmodels.stats.contingency_tables as ctab import pandas as pd from numpy.testing import assert_allclose, assert_equal import statsmodels.api as sm cur_dir = os.path.dirname(os.path.abspath(__file__)) fname = "conting...
# -*- coding: utf-8 -*- """ Created on Tue Sep 26 14:52:43 EDT 2017 @author: ben Genrate ui pyuic5 -x ndust.ui -o ndustgui.py """ __author__ = "<NAME>" __copyright__ = "Copyright 2017, <NAME>" __license__ = "MIT" __version__ = "0.1.0" __email__ = "<EMAIL>" __status__ = "Development" import sys import os #from PyQt5...
# # This file is part of GreatFET # from __future__ import print_function import sys from warnings import warn from ..interface import GreatFETInterface from ..support.bits import bits from ..protocol.jtag_svf import SVFParser, SVFEventHandler class JTAGPatternError(IOError): """ Class for errors that come fro...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import math import numpy as np import openmdao.api as om from wisdem.commonse.akima import Akima from wisdem.commonse.csystem import DirectionVector from wisdem.commonse.utilities import cosd, sind # , linspace_with_deriv, interp_with_deriv, hstack, vstack from wisdem.commonse.environment import LogWind, PowerWind, L...
# GenerateSpectraPages.py import argparse import os import time from astropy.coordinates import SkyCoord from astropy.io import ascii, votable from astropy.io.votable import parse_single_table, from_table, writeto from astropy.table import Column, Table import astropy.units as u import numpy as np def parseargs(): ...
# <NAME> # CPSC 386 FALL 2016 # Project 5 (Final Project) # <EMAIL> # Armada.py is a top-down space shooter game made using Python 3.4 and Pygame 1.9. import sys, random, time, pygame from pygame.locals import * # Colors WHITE = (255, 255, 255) BLACK = (0, 0, 0 ) RED = (255, 0, 0 ) GREEN = (0, 255, 0 ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 25 13:53:31 2018 @author: alechat """ import os, sys if os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) not in sys.path: sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))...
import collections from django.shortcuts import render from django.urls import reverse, resolve from django.http import HttpResponseRedirect, JsonResponse, HttpResponse from django.contrib.auth.decorators import login_required from django.forms import formset_factory from .models import NOTTTravel, NOTTChaperon, NOTTCh...
''' Library containing definitions relevent to GRBL-based controllers * List of Supported G-Codes in Grbl v1.1: - Non-Modal Commands: * G4: dwell for given period (X, U, or P) * G10 L2 P?: change G5? work coordinate system origin setting * G10 L20 P?: calculated G5? work coordinate system origin * G2...
#Author-<NAME> #Description-Create a basic multi-post setup sheet import adsk.core, adsk.fusion, adsk.cam, traceback import os, sys, re import math import time import pathlib THISSCRIPT = "Setup Sheet Generator v2 (c) <NAME> 2020" # Set these to True or False (case sensitive) to enable or disable output TXTOUTPUT = ...
import inspect import logging import os from itertools import product from multiprocessing import JoinableQueue, Process from queue import Empty import numpy as np import torch import torch.nn.functional as F from pandas import DataFrame from fonduer.learning.models.marginal import Marginal logger = logging.getLogge...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from collections import defaultdict from typing import Dict, Set, List, Tuple from time import time from subprocess import run, PIPE, TimeoutExpired from random import randint import re class NetworkError(RuntimeError): """any error related to this module""" class...
import numpy as np import pandas as pd import read_data as rd import argparse import os import time import sklearn from sklearn.externals import joblib from sklearn.metrics import precision_recall_curve from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor def prepare_data(df=N...
#!/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 distributed...
import os import pandas import uuid import math import plotly.graph_objects as go from scipy.stats import sem, norm import numpy from plotly.subplots import make_subplots import glob from models import Gillespie, CellDivision, DeterministicCellDivision n_A = 6.023E23 # Avogadro's Number e_coli_vol = 6.5E-16 # Liters...
try: import ijson.backends.yajl2_cffi as ijson except: import ijson from datetime import datetime, date, timedelta from collections import OrderedDict from bs4 import BeautifulSoup from warnings import warn from copy import copy from urllib.request import urlopen import argparse import requests import zipfile import j...
import pytest import gevent import logging import time from volttron.platform import get_services_core, jsonapi from volttrontesting.utils.utils import get_rand_ip_and_port from platform_driver.interfaces.modbus_tk.server import Server from platform_driver.interfaces.modbus_tk.maps import Map, Catalog from volttron.pl...
# adapt from amrlib smatch file used for approximating the largest common supgraph between two AMRs #!/usr/bin/env python # -*- coding: utf-8 -*- import re import random import amr import sys # total number of iteration in smatch computation import penman from penman.models.noop import NoOpModel iteration_num = 5 ...
import tensorflow as tf from utils.util_class import WrongInputException def augmentation_factory(augment_probs=None): augment_probs = augment_probs if augment_probs else dict() augmenters = [] for key, prob in augment_probs.items(): if key is "CropAndResize": augm = CropAndResize(prob...
"""Highlights API handler.""" import json import os import time from time import sleep import requests import threading try: from gateway_addon import APIHandler, APIResponse, Adapter, Device, Property, Database #print("succesfully loaded APIHandler and APIResponse from gateway_addon") except: print("Imp...
#!BPY """ Name: 'GMDC (.gmdc)' Blender: 249 Group: 'Export' Tooltip: 'Export to TS2 GMDC file' """ # ------------------------------------------------------------------------------- # Copyright (C) 2016 DjAlex88 (https://github.com/djalex88/) # # Permission is hereby granted, free of charge, to any person obtaining a...
#!/usr/bin/env python # coding: utf-8 # In[1]: # import tensorflow as tf import tensorflow.keras.backend as K from tensorflow.keras.models import Sequential, Model import cv2 import matplotlib.pyplot as plt import numpy as np import pandas as pd # In[2]: path_all_tfrecord = "fp56.tfrecord" # In[3]: dir_fro...
# coding=utf-8 # Copyright 2021 The Edward2 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# -*- coding: utf-8 -*- # Copyright 2022, SERTIT-ICube - France, https://sertit.unistra.fr/ # This file is part of eoreader project # https://github.com/sertit/eoreader # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ob...
#! /usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lic...
#!/usr/bin/python3 """ Simplify AST-XML structures for later generation of Python files. """ from optparse import OptionParser import os import os.path import sys from xml.etree import ElementTree from xml.dom import minidom # type: ignore import logging import importlib from importlib import machinery from . import p...
# Copyright 2019 <NAME> and <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 wri...
from collections import OrderedDict import pandas as pd import numpy as np from tia.analysis.model.interface import ( TxnColumns as TC, MarketDataColumns as MC, PlColumns as PL, TxnPlColumns as TPL, ) from tia.analysis.perf import periods_in_year, guess_freq from tia.util.decorator import lazy_propert...
import numpy as np import math import matplotlib.pyplot as plt import pickle from time import time from numpy.linalg import matrix_rank from numpy.linalg import pinv,inv from numpy.linalg import eig as eig from numpy.linalg import eigh,lstsq from numpy.linalg import matrix_power from scipy.linalg import expm,pinvh,solv...
from collections import OrderedDict import pytest import sys import yaml from apispec import APISpec, BasePlugin from apispec.exceptions import ( APISpecError, DuplicateComponentNameError, DuplicateParameterError, InvalidParameterError, ) from .utils import ( get_schemas, get_paths, get_p...
""" bandage, v1.0. Made by perpetualCreations """ from platform import system from hashlib import md5 from time import time from tempfile import gettempdir from os import mkdir, path, remove, listdir from shutil import unpack_archive, copyfile, make_archive, rmtree, copytree from io import StringIO from contextlib im...
## UnitUtil ## ## Utilities for dealing with Civ4 Units and their related objects. ## ## Copyright (c) 2008 The BUG Mod. ## ## Author: EmperorFool from CvPythonExtensions import * import BugUtil import PlayerUtil # BUG - Mac Support - start BugUtil.fixSets(globals()) # BUG - Mac Support - end gc = Cy...
from multiprocessing import Pool from functools import partial from pathlib import Path import pandas as pd import numpy as np from numpy import array import matplotlib.pyplot as plt import tqdm from fire import Fire from bifacial_radiance.main import RadianceObj,AnalysisObj, _popen Path.ls = lambda x: sorted(list(x....
################################################################# # Code written by <NAME> (<EMAIL>) # For bug report, please contact author using the email address ################################################################# import sys, random, time, argparse from collections import OrderedDict import pickle imp...
import os, sys import numpy as np import time import glob import random import math from typing import Any, Callable, cast, Dict, List, Optional, Tuple from PIL import Image import pickle import torch as tc from torchvision import transforms from torchvision import datasets #from torchvision.datasets.folder import de...
# Copyright 1999-2021 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...
#!/usr/bin/env python # # Copyright (c) 2018 SAP SE # 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 # # ...
import math SNAP = 0.001 class Vector2(object): def __init__(self, x=0.0, y=0.0): self.x = x self.y = y class Vector3(object): def __init__(self, x=0, y=0, z=0): self.x = x self.y = y self.z = z def clone(self): return Vector3(self.x, self.y, s...
__author__ = 'oddBit' from kivy.uix.scatterlayout import ScatterLayout from kivy.animation import Animation from kivy.clock import Clock from data.gameData import * from HexTile import HexTile from UpDownBubble import UpDownBubble from random import choice, shuffle, random from kivy.properties import NumericProperty, ...
import sys, os import datetime pippath = __file__ pippath_folder, filename = os.path.split(pippath) try: import setuptools except ImportError: print("Installing setuptools...") # install setuptools setuptools_path = '"%s"' %os.path.join(pippath_folder, "ez_setup.py") python_folder = os.path.sp...
from direct.directnotify.DirectNotifyGlobal import directNotify from direct.gui.DirectGui import * from panda3d.core import * from pirates.ai import HolidayGlobals from pirates.battle import WeaponGlobals from pirates.economy import EconomyGlobals from pirates.economy.EconomyGlobals import ItemType from pirates.holiday...
import logging import os from galaxy.util.dictifiable import Dictifiable from galaxy.util.bunch import Bunch from galaxy.util import asbool from tool_shed.util import common_util from urlparse import urljoin log = logging.getLogger( __name__ ) class ToolShedRepository( object ): dict_collection_visible_keys = ( ...
from genfigs.genfigs import * # from ofspy.task import Task # from ofspy.path import Path import networkx as nx import random from collections import Counter from scipy.optimize import minimize # from matplotlib import pylab as plt # import math import numpy as np import matplotlib.pyplot as plt from gurobipy import Mo...
import os import sys from collections import namedtuple, defaultdict import json import pickle from glob import glob from datetime import datetime, timedelta import subprocess as sp import logging import traceback PARTICIPANT_NAME = 'aaalgo' CMS_HOME = os.path.abspath(os.path.dirname(__file__)) CORE_LIB_PATHS = [os....
"""ACME protocol messages.""" import datetime from collections.abc import Hashable import json from typing import Any from typing import Dict from typing import Iterator from typing import List from typing import Mapping from typing import MutableMapping from typing import Optional from typing import Tuple from typing ...
from __future__ import annotations from enum import Enum from typing import * from abc import abstractmethod from itertools import chain from . import edgir from .Exceptions import * from .Array import BaseVector, DerivedVector, Vector from .Core import Refable, HasMetadata, builder, SubElementDict, non_library from ...
#!/usr/bin/env python3 """ Update the S3 bucket with new config files and assets. """ import glob import json import os import re import shutil import subprocess import sys import time import boto3 # Types of assets ASSET_TYPES = { 'json': ['.json'], 'image': ['.png', '.gif', '.jpg'], 'text': ['.txt'],...
# -*- coding: utf-8 -*- # Copyright © 2012-2014 Zulip, Inc. # # 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, mod...
#!/usr/bin/env python """ Requirements: Python 3 or higher Antechamber and related AmberTools OpenBabel (strongly recommended for use with acpype) acpype (latest version recommended with all its requirements) Gromacs (Compulsory) flask (Compulsory) ...
import logging import traceback from collections import namedtuple from copy import deepcopy from datetime import datetime, timedelta from functools import lru_cache, partial import pytz import requests from django.db import transaction from django.utils.dateparse import parse_time from django.utils.timezone import no...
from pprint import pprint import numpy as np from collections import Counter import itertools, copy from more_itertools import split_before import os, json, traceback, time, warnings, shutil, sys import multiprocessing from miditoolkit.midi.parser import MidiFile from miditoolkit.midi.containers import Instrument from ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
#!/usr/bin/env python # Name: testManager.py # Abstract: # A python tool to launch and manage EPICS CA and PVA stress tests # Uses threading and paramiko ssh transport to run needed clients and servers on # each host machine which will be used in the test. # # Example: # stressTest/testManager.py --testDir /path/to/t...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import contextlib import itertools...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 18 10:12:42 2020 @author: shlomi """ from PW_paths import work_yuval ims_path = work_yuval / 'IMS_T' gis_path = work_yuval / 'gis' awd_path = work_yuval/'AW3D30' def interpolate_var_ds_at_multiple_dts(var_ds, geo_var_df, predict_df, ...
""" Import needed modules """ "-----------------------------------------------------------------------------" from scipy.integrate import solve_ivp from Shared_Funcs.pemfc_transport_funcs import * import cantera as ct import numpy as np import sys """ Control options for derivative functions """ "---------------------...
from itertools import permutations import torch from torch import nn from scipy.optimize import linear_sum_assignment import numpy as np import torch.nn.functional as F class PITLossWrapper(nn.Module): r"""Permutation invariant loss wrapper. Args: loss_func: function with signature (est_targets, targ...