text
stringlengths
8.04k
46.5k
#!/usr/bin/env python3 """Converts otu tables from diatom analysis into a suitable format for uploading to BIOSYS. Additionally it will create a "otus_all.xlsx" for community analysis. If extraction sheets are provided in an appropriate format then it will also calculate the most similar sample and provide the Baron...
#!/usr/bin/env python2 import Tkinter as tk import ttk import os import webbrowser import tkFont import tkFileDialog import tkMessageBox import threading from datetime import datetime class Editor(tk.Tk): def __init__(self): #This function is necessary to start tk tk.Tk.__init__(self) #Se...
import random from speedo.algorithms.regression.mono import Mono class DataFrame: """ { 0: [ [ [x..], [y..] ], [ [x..], [y..] ] .. ], 1: .. } """ def __init__(self): self.di = {} # ind auto increment, used as key of di self.ind = None ...
import contextlib import os.path import re from abc import ABC, abstractmethod from collections import OrderedDict from logging import getLogger import mutagen.flac from flac_to_mka.flac import arguments from flac_to_mka.util import ext, time FLACTime = time.Time logging = getLogger(__name__) IgnoreKeyError = conte...
import os import numpy as np from pytools import memoize import pyopencl as cl import pyopencl.cltypes from pyopencl.elementwise import ElementwiseKernel from pyopencl.scan import GenericScanKernel from compyle.opencl import get_context, get_queue, named_profile from compyle.array import Array from pysph.base.tree.he...
# -*- coding: utf-8 -*- import json import os from xml.etree.ElementTree import ElementTree, parse, dump, Element, SubElement from sklearn.metrics import precision_recall_fscore_support import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as mpatches from sklearn.svm import SVC import copy from...
import torch import torch.nn as nn from torch.nn import init from torchvision import models from torch.autograd import Variable import torch.utils.model_zoo as model_zoo import math from collections import OrderedDict import re import torch.nn.functional as F __all__ = ['resnet18', 'resnet50', 'densenet121'] model_u...
import logging import tempfile import os import torch from collections import OrderedDict from tqdm import tqdm from maskrcnn_benchmark.modeling.roi_heads.mask_head.inference import Masker from maskrcnn_benchmark.structures.bounding_box import BoxList from maskrcnn_benchmark.structures.boxlist_ops import boxlist_iou ...
#!/usr/bin/env python # coding: utf-8 ######################################## # clustered Gaussian surrogate # ######################################## #Author: <NAME> #<EMAIL> #Last update: 2021-Apr-28 ######################################## # System information # ##########################...
""" Attribution """ import datetime import pandas as pd import numpy as np import win32com.client import matplotlib import matplotlib.pyplot as plt import attribution.extraction from dateutil.relativedelta import relativedelta start_date = datetime.datetime(2020, 1, 31) end_date = datetime.datetime(2020, 3, 31) input...
# Program by <NAME> # Based on the the 1981 board game InnerCircle, (Milton Bradley company) import random import sys import os from colored import fg, bg, attr from board1 import B1 from board2 import B2 from board3 import B3 from board4 import B4 COLORIZE_BOARD = True HARD_MODE = False def flatten(l): return [i...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import requests import dateparser from typing import Dict, Any # disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS ''' BASE_URL = 'http://api.domaintools.com' USERNAME...
import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import tensorflow as tf config = tf.compat.v1.ConfigProto() config.gpu_options.allow_growth = True session = tf.compat.v1.Session(config=config) import matplotlib.pyplot as plt import tensorflow_probability as tfp tfd = tfp.dist...
# Copyright (c) 2010-2016 <NAME> # Copyright (c) 2010-2016 <NAME> # Copyright (c) 2010-2016 Stony Brook University # Copyright (c) 2010-2016 The Research Foundation of SUNY # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Soft...
""" Mask R-CNN based Motorcyclist and Helmet detection Train on the Helmet dataset and implement color splash effect. Copyright (c) 2018 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by <NAME> Customized by : <NAME> & <NAME> Date : 10th May 2020 ----------...
import os import numpy as np import h5py as h5 import glob import shutil from .data_reader import DataReader_pred from .predict_fn import pred_fn import pkg_resources model_dir = pkg_resources.resource_filename('phasenet', os.path.join('model', '190703-214543')) script_path = os.path.dirname(os.path.realpath(__fil...
#!/usr/bin/env python import general_robotics_toolbox as rox import numpy as np import pytest import sys if (sys.version_info > (3, 0)): xrange = range #Numeric precision reduced for literals eps = 1e-6 #np.finfo(np.float64).eps #inches to meters conversion factor #(use Pint package for any real programs) in_2...
# coding: utf-8 """Jupiter audio sequencer.""" import os import uuid import time import threading import audioop import math import struct import wave import numpy import pyaudio from boring import draw from boring.window import SubWindow, Window, import_tkinter, import_filedialog from boring.widgets import Label, E...
import os import ast import datetime import configparser import MyUtilities.common NULL = MyUtilities.common.NULL openPlus = MyUtilities.common.openPlus #Monkey Patches configparser.ConfigParser.optionxform = str class Configuration(MyUtilities.common.EnsureFunctions, MyUtilities.common.CommonFunctions): """Used t...
# -*- coding: utf-8 -*- """A command line application for managing BEL Commons. Run with ``python -m bel_commons`` or simply as ``bel-commons``. """ import datetime import json import logging import multiprocessing import os from typing import Optional, TextIO import click import sys import time from bio2bel import...
import pickle import re import numpy as np import pandas as pd import os from datetime import datetime from collections import defaultdict import tensorflow as tf import os import netCDF4 as nc import numpy as np import xarray as xr from datetime import timedelta, datetime from scipy.stats import percentileofscore fr...
r"""We deal with the representation of elements of the monster group. Generators of the monster group :math:`\mathbb{M}` .................................................. Conway :cite:`Con85` has constructed a ``196884``-dimensional rational representation :math:`\rho` of the monster :math:`\mathbb{M}` based on r...
# Imports: standard library import os import sys import argparse import datetime import tempfile import multiprocessing as mp from time import time from typing import Dict, List, Type, Tuple, Union, Callable from itertools import product # Imports: third party import h5py import numpy as np import pytest import neurok...
""" runs using 1) python/3.3.2 2) numpy/1.11.1/python/3.3 3) scipy/0.17.1/python/3.3 module load python3/3.3.2 /scratch/mhess/py3p3/3.3 Aim: do MOR steady state solver with efficient matrices """ import numpy as np import time from ITHACA_SEM_code import ROM_Oseen_Iteration_step from ITHACA_S...
from dataclasses import dataclass from typing import List import numpy as np import scipy.spatial import matplotlib.pyplot as plt from spherical_geometry.polygon import SingleSphericalPolygon from .celeri_util import sph2cart def angle_between_vectors(v1, v2, v3): """ Compute the angle between the vector (v...
import dgl import torch import math import time import numpy as np import dgl.nn.pytorch as dglnn import torch.nn as nn from utils import * from metrics import * class Perceptron(torch.nn.Module): def __init__(self, in_dim, out_dim, dropout=0, norm=False, act=True): super(Perceptron, self).__init__() ...
# -*- coding: utf-8 -*- from collections import defaultdict try: import numpy as np except ImportError: np = None import pytest from ..util.testing import requires from ..units import ( amount, allclose, concatenate, concentration, fold_constants, energy, get_derived_unit, is_...
#! /usr/bin/python3 import os,sys VERSION = '31mar2021' from arrow import make_arrow print('AAAAA') def main(): if ('-help' in sys.argv)or('-h' in sys.argv)or(len(sys.argv)==1): print(Example) return Fname = sys.argv[1] Foutname = 'plotted' if '-o' in sys.argv: ind = sys.argv.i...
# _*_ coding: utf-8 _*_ """ElasticSearch Dialect""" import logging import re import isodate from zope.interface import alsoProvides from fhirpath.enums import OPERATOR, GroupType, MatchType, SortOrderType, TermMatchType from fhirpath.interfaces import IFhirPrimitiveType, IPrimitiveTypeCollection from fhirpath.interfa...
from sklearn.linear_model import LinearRegression from sklearn.decomposition import PCA import matplotlib.pyplot as plt from required_modules.amplitude_encoding import * from required_modules import gaussian_decoding as gd import tqdm def standardize_data(X): ''' This function standardize an array, ...
import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import cv2 from moviepy.editor import VideoFileClip import glob # Define a class to receive the characteristics of each line detection class Line(): def __init__(self): # was the line detected in the last iteration? self.detecte...
# -*- coding: utf8 -*- """ Helper functions used here and there author: <NAME>, last update: 06.2019 """ import os import pickle from copy import deepcopy import numpy as np import pywt from brian2.units import * from poisson_proc import hom_poisson, get_tuning_curve_linear from brian2.units.allunits import * from bri...
# pybids has to be greater than 0.5 from .interfaces import BIDSDataGrabberPatch from nipype.pipeline import engine as pe from argparse import ArgumentParser from nipype.interfaces import utility as niu import os def main(): opts = get_parser().parse_args() # define and create the output directory outdir...
import tensorflow as tf from tensorflow.python.layers.core import Dense import numpy as np import time import matplotlib as mpl import copy import os from tensorflow.python.ops import rnn_cell_impl # mpl.use('Agg') # import matplotlib.pyplot as plt import os # Number of Epochs epochs = 100 # Batch Size ...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.3 # kernelspec: # display_name: Python 3 # name: python3 # --- # + [markdown] id="view-in-github" colab_type="text" # <a href="https://colab...
from flask_restx import Namespace, Resource, fields from flask import request, abort import sqlite3 import os import models import time from textdistance import jaro_winkler from utils.token import Token from utils.attributes import simple_attributes, detail_attributes from utils.function import unpack api = Namesp...
#!/usr/bin/env python # -*- coding: utf-8 -*- import gzip import json import os import site import sys import time import numpy as np import pandas as pd import torch from collections import defaultdict, OrderedDict from bert_score.utils import bert_cos_score_idf, cache_scibert, get_idf_dict, get_model, lang2model, mo...
import numpy as np import torch import math from .graph_hex_board import GraphHexBoard from .players import HORIZONTAL_PLAYER, VERTICAL_PLAYER, EMPTY_CELL class Board(): def __init__(self, np_pieces): assert np_pieces.shape[0] == np_pieces.shape[1] self.np_pieces = np_pieces @property de...
import os import sys import json import pickle import random import torch # from torch.utils.tensorboard.summary import image from tqdm import tqdm import matplotlib.pyplot as plt import numpy as np import pylab as pl from mpl_toolkits.axes_grid1.inset_locator import inset_axes import torchvision.transforms.function...
import math import logging from functools import partial import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint as cp from torch.autograd import Variable from mmcv.cnn import constant_init, kaiming_init from mmcv.runner import load_checkpoint from ....utils.misc import rgetat...
import mitmproxy.http import mitmproxy.ctx import mitmproxy.utils import os import base64 import urllib.parse import urllib.request import re import json import time import xml.etree.ElementTree as ET import sqlite3 import concurrent.futures import logging import logging.handlers class FirewallRule: def __init__(sel...
############################################# IMPORTING MODULES import tkinter as tk from tkinter import ttk from tkinter import PhotoImage from tkinter import Canvas from tkinter import messagebox as mess import tkinter.simpledialog as tsd import os from cv2 import cv2 import csv import numpy as np from PIL import Ima...
# Copyright (C) 2017-2020 JCT # # 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, distribut...
from model.gnn import GNN from model.scoring import Scoring from data.link_gen import LinkGenerator, init_fn from torch.utils.data import DataLoader from time import perf_counter, time import torch.nn.functional as F import torch import numpy as np import config import tempfile from collections import Counter from tqdm...
#Copyright 2014 <NAME> and Associates # #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, ...
""" Cisco_IOS_XE_ios_events_oper This module contains a collection of YANG definitions for asynchronous events from network element. Copyright (c) 2016\-2018 by Cisco Systems, Inc. All rights reserved. """ from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YL...
''' Copyright (c) 2020 magilisaau, <EMAIL>, MIT license ebuilder sample, how to build an underwater house in 6 minutes: https://youtu.be/zU4bbt1ONbc youtube on ebuilder: https://youtu.be/V2RiOmHseGM Author: Magi Contact: <EMAIL> CreateTime: 2020/04/20 ModifyTime: 2020/5/10 Description: the project is to help kids buil...
import time import threading import requests L = 'http://localhost:8001' TIMEOUT = 5 def make_request(method): method = getattr(requests, method) def req(path, *a, type=None, headers=None, **kw): if 'timeout' not in kw: kw['timeout'] = TIMEOUT if type: if no...
""" Optimize the initial cage for a new source shape """ from __future__ import print_function from pprint import pprint import traceback import sys import datetime import shutil import torch import os import numpy as np import pymesh from pytorch_points.misc import logger from pytorch_points.network.operations import ...
import os import unittest from __main__ import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging # # DICOMPatcher # class DICOMPatcher(ScriptedLoadableModule): """Uses ScriptedLoadableModule base class, available at: https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/Scr...
""" Dataset for training of BoxPC models. Author: <NAME> Date: July 2019 """ import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(BASE_DIR, '../sunrgbd_data')) sys.path.append(os.path.join(BASE_DIR, '../../train')) import random import numpy as np from collections ...
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
from tqdm import tqdm import torch import torch.nn as nn from torch.utils.data import DataLoader, Dataset import pickle import os import logging import numpy as np import copy import higher import random from poincare_utils import PoincareDistance class LabelDataset(Dataset): def __init__(self, N, ...
""" Views for the nextbus website. """ import collections import datetime import re import string import dateutil.tz from flask import (abort, Blueprint, current_app, g, jsonify, Markup, render_template, redirect, request, session, url_for) from sqlalchemy.dialects import postgresql as pg from werkz...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Apr 20 10:32:56 2021 @author: ziskin """ from PW_paths import work_yuval axis_path = work_yuval / 'axis' gis_path = work_yuval / 'gis' axis_duplicate_stations_name_dict = {'DSea': 'Ddse', 'Gsho': 'Gshr', 'KShm': 'kshm', 'Kshm': 'kshm', 'Rhat': 'Raha'}...
import itertools import collections import numpy as np import pandas as pd import scipy.misc import pickle import contextlib import datetime import statsmodels.tools.numdiff import remixt.bpmodel def _get_brkend_seg_orient(breakend): n, side = breakend if side == 1: n_left = n orient = +1 ...
# Copyright 2019 <NAME>; All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# A module to interpolate Live Ocean results onto Salish Sea NEMO grid and # save boundary forcing files. # <NAME>, August 2016 # <EMAIL> import netCDF4 as nc import xarray as xr import numpy as np import datetime from scipy import interpolate import mpl_toolkits.basemap as Basemap import glob import os import sys ...
from datetime import datetime from datetime import timedelta import struct import numpy as np from numpy import dtype import netCDF4 from netCDF4 import stringtochar import argparse import warnings warnings.simplefilter('ignore', DeprecationWarning) def main(): parser = argparse.ArgumentParser() parser.add_a...
#!/usr/bin/env python3 """ I keep a database of notes on books that I've read and films that I've watched. This script helps me manage this database by - allowing me to search the database intelligently. - assisting with data entry and automatically formatting the entries nicely. Author: <NAME> (<EMAIL>) Version: J...
import tensorflow as tf from typing import Tuple from .utils import FFN class BaseAttention(tf.keras.layers.Layer): def __init__(self, attention_dim, name='BaseAttention', **kwargs): super(BaseAttention, self).__init__(name=name, **kwargs) self.attention_dim = attention_dim def call...
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
from tkinter import ttk, filedialog, Label, Frame, W, Entry, E, Canvas, NW from PIL import Image as PILImage,ImageTk import tkinter as tk import yaml import copy class GUI(tk.Tk): def __init__(self, *args, **kwargs): tk.Tk.__init__(self, *args, **kwargs) #variable for file path self.yamlPat...
# -*- coding: utf-8 -*- # # general_models.py # # Copyright 2020 Amazon.com, Inc. or its affiliates. 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.ap...
from WavetableEditor.Wavetable import * def gaussian(x, m, s, scale=False): return (1. / (s * np.sqrt(2 * np.pi)) if scale else 1.) * np.exp(-(x - m) ** 2 / (2 * s ** 2)) names = ["Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magne...
#! /usr/bin/python # Copyright (c) 2016 Freescale Semiconductor, Inc. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # o Redistributions of source code must retain the above copyright notice, this list # of condit...
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import io import configparser from yandex_translate import YandexTranslate, YandexTranslateException import mysql.connector from mysql.connector import errorcode import re def debug_print(*vargs, **kwargs): if debug_mode...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division, print_function, absolute_import import os import json import types import re from functools import partial import itertools import logging import inspect import copy from socket import gethostname import cgi import io from datatypes import ( ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import math import time import numpy as np import tensorflow as tf import tf_util import reader from helpers import compute_KL parser = argparse.ArgumentParser() parser.add_argument('-model', ...
import json import threading import time import os import stat import ssl from decimal import Decimal from typing import Union, Optional, Dict, Sequence, Tuple from numbers import Real from copy import deepcopy from aiorpcx import NetAddress from . import util from . import constants from .util import base_units, bas...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team. # # 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/LICENS...
"""Test ZHA Core channels.""" import asyncio from unittest import mock from unittest.mock import AsyncMock, patch import pytest import zigpy.profiles.zha import zigpy.types as t import zigpy.zcl.clusters import homeassistant.components.zha.core.channels as zha_channels import homeassistant.components.zha.core.channel...
# Gist example of IB wrapper ... # # Download API from http://interactivebrokers.github.io/# # # Install python API code /IBJts/source/pythonclient $ python3 setup.py install # # Note: The test cases, and the documentation refer to a python package called IBApi, # but the actual package is called ibapi. Go figure. #...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' from requests import HTTPError from typing import Dict, Any from json.decoder import JSONDecodeError import json import traceback import requests import math # Disable insecure warnings requests.packag...
import json from datetime import datetime as dt from typing import Dict from typing import List from typing import Optional from typing import Tuple from uuid import uuid4 as uuid import arrow from dinofw.cache.redis import CacheRedis from dinofw.db.rdbms.schemas import GroupBase from dinofw.db.rdbms.schemas import U...
from __future__ import absolute_import, division, print_function, unicode_literals import math import warnings from abc import ABCMeta, abstractmethod from functools import partial import torch import torch.nn as nn from torch._jit_internal import List, Optional class _PartialWrapper(object): def __init__(self,...
import math import os import shutil import time from os import listdir from os.path import basename, join, dirname from PIL import Image, ImageDraw from FileBrowserDT import fileBrowserDT from GPIO_Init import getFont, getKeyStroke, displayImage, getSmallFont, getAnyKeyEvent from OP_1_Connection import get_abbreviatio...
# -*- coding: utf-8 -*- """ L-functions from PARI This is a wrapper around the general PARI L-functions functionality. AUTHORS: - <NAME> (2018) interface """ # **************************************************************************** # Copyright (C) 2018 <NAME> <<EMAIL>> # # This program is free software: ...
import yaml from . import template as template_helper if hasattr(__builtins__, 'unicode'): # Inspired by: https://stackoverflow.com/questions/6432605/any-yaml-libraries-in-python-that-support-dumping-of-long-strings-as-block-liter class literal_unicode(unicode): pass else: # PY3 class literal_unic...
import os import sys import warnings from math import pi import numpy as np import param from bokeh.plotting import figure from bokeh.models import ColumnDataSource from tqdm.asyncio import tqdm as _tqdm from ..layout import Column, Row from ..models import ( HTML, Progress as _BkProgress, TrendIndicator as _Bk...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#======================================================================= # verilator_cffi.py #======================================================================= from __future__ import print_function import os import shutil import verilog_structural from ...tools.simulation.vcd import get_vcd_timescale from sub...
"""This module contains the general information for StorageVirtualDrive ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class StorageVirtualDriveConsts: ACCESS_POLICY_BLOCKED = "blocked" ACCESS_POLICY_HIDDEN = "hidden" ...
import re import pickle as pickle from collections import namedtuple import numpy as np import skimage.transform from scipy.fftpack import fftn, ifftn from skimage.feature import peak_local_max, canny from skimage.transform import hough_circle import skimage.draw from configuration import config import utils ...
#!/usr/bin/python # Copyright: Ansible Project # 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', 'status': ['preview'], ...
#!/usr/bin/env python # coding: utf8 # # Copyright (c) 2021 Centre National d'Etudes Spatiales (CNES). # # This file is part of demcompare # (see https://github.com/CNES/demcompare). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
#!/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...
""" Distributed Prioritized Experience Replay (Ape-X) ================================================= This file defines a DQN trainer using the Ape-X architecture. Ape-X uses a single GPU learner and many CPU workers for experience collection. Experience collection can scale to hundreds of CPU workers due to the di...
# Natural Language Toolkit: First-order Resolution-based Theorem Prover # # Author: <NAME> <<EMAIL>> # # Copyright (C) 2001-2012 NLTK Project # URL: <http://www.nltk.org> # For license information, see LICENSE.TXT """ Module for a resolution-based First Order theorem prover. """ from __future__ import print_function ...
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2004 <NAME> <<EMAIL>> # Copyright (C) 2005 <NAME> <<EMAIL>> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are als...
import os import os.path from collections import defaultdict from functools import partial import numpy as np from yt.frontends.art.definitions import ( hydro_struct, particle_fields, particle_star_fields, star_struct, ) from yt.units.yt_array import YTArray, YTQuantity from yt.utilities.fortran_utils...
# coding=utf-8 # Copyright 2020 The HuggingFace Team 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 require...
# -*- coding: utf-8 -*- # # Copyright 2013 Google LLC. 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 requir...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import string import json blink_protocol_path = sys.argv[1] browser_protocol_path = sys.argv[2] output_cc_path = sys.argv[3...
import networkx as nx from pymnet import * import random import matplotlib import cascade as cas import statistics import math import time import csv matplotlib.use('TkAgg') nodes = 500 layers = 3 intra_thres = 0.2 inter_thres = 0.2 attack_size = 10 attack_point = (0.5, 0.5) attack_type = "spatial_number" #...
import os from .__init__ import __version__ import numpy as np from dendropy.simulate import treesim from dendropy.model import reconcile from dendropy import TaxonNamespace, Tree import copy import math from collections import defaultdict, Counter from tqdm import tqdm from scipy import optimize, stats from .isvalid ...
# Copyright (c) 2009 by <NAME>. All rights reserved. # Copyright (c) 2008 by <NAME>. All rights reserved. # Copyright (c) 2007 by <NAME>. All rights reserved. # Copyright (c) 2006 by <NAME>. All rights reserved. # Copyright (c) 2005 by <NAME>. All rights reserved. # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO...
#!/usr/bin/env python3 # # This file is open source software, licensed to you under the terms # of the Apache License, Version 2.0 (the "License"). See the NOTICE file # distributed with this work for additional information regarding copyright # ownership. You may not use this file except in compliance with the Licen...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Module for class `Link`, which wraps a single command line application. """ from __future__ import absolute_import, division, print_function import sys import os import copy import argparse import subprocess import abc from collections import Ordere...
# 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,...