text
stringlengths
3.07k
22.1k
from __future__ import absolute_import, division, print_function from builtins import (bytes, str, open, super, range, zip, round, input, int, pow, object, map, zip) __author__ = "<NAME>" import numpy as np from . import minimizer #import sed_models_dic as Model_dic from .jet_model import...
import warnings from enum import Enum import torch import torch.nn as nn from colorama import Fore, Style from mmlib.util.helper import print_info, get_device class ProbeInfo(Enum): LAYER_ID = 'layer_id' FORWARD_INDEX = 'forward_index' BACKWARD_INDEX = 'backward_index' LAYER_NAME = 'layer_name' ...
"""Utils for ViViT-based regression models.""" from typing import Any from absl import logging import flax import jax.numpy as jnp import ml_collections import numpy as np from scenic.common_lib import debug_utils from scenic.projects.vivit import model_utils as vivit_model_utils average_frame_initializer = vivit_m...
import cv2 import numpy as np from time import gmtime, strftime from math import pi, atan2 #NEEDED DATA TWO_PI = 2 * pi #Remember to change this to the correct path data_folder_path = '$HOME/Documents/ItLeavesATrail/data/' books = [ 'Angels and Demons', # 'Anne of Green Gables & Anne of Avonlea', '<NAM...
#!/usr/bin/env python import os import sys import subprocess import logging import shutil import datetime import json import argparse import zipfile import xml.etree.ElementTree as ET from io import BytesIO from collections import OrderedDict from pds_pipelines.redis_queue import RedisQueue from pds_pipelines.redis_h...
""" Implementation of Postgres composite types in Django. (c) 2016, <NAME> <<EMAIL>> 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 n...
# Copyright (c) 2021 PaddlePaddle 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 app...
from typing import List import tensorflow as tf import numpy as np import lunzi as lz from lunzi import nn, rl from boots import * from boots.envs.batched_env import BatchedEnv from boots.partial_envs import make_env, FLAGS as EnvFLAGS from boots.normalizer import Normalizers from boots.envs.virtual_env import Virtual...
import numpy as np import time class Perceptron(): def __init__(self, activation = 'tanh', learning_rate = None, synapses = None): if (synapses == None): self.synapses = 2 * np.random.random((2, 1)) - 1 else: self.synapses = synapses self.epoch = 0 self.t...
import matplotlib.pyplot as plt import numpy as np import pandas as pd import math from matplotlib import colors from matplotlib.ticker import PercentFormatter from mpl_toolkits import mplot3d import os import shutil class createPlots(): def __init__(self, data, outFolderName, defParams, idmRatio, plot = True): ...
#!/usr/bin/env python # # Copyright (C) 2011, 2012 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 # (...
#! /usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from propobject import BaseObject LBDAREF = 7000 # ========================= # # # # Chromaticity # # # # ========================= # def sigma_chromaticity(lbda, sigmaref, rho=-1/5., lbd...
"""Example application of lsqfit-gui on a "basic fit" from the lsqfit documentation. See also https://lsqfit.readthedocs.io/en/latest/overview.html#basic-fits """ from itertools import product import numpy as np import pandas as pd import gvar as gv import lsqfit import plotly.express as px import lsqfitgui T_MI...
"""tests rio_tiler.landsat8""" import os from unittest.mock import patch import numpy import pytest import rasterio from rio_tiler.errors import InvalidBandName, MissingBands, TileOutsideBounds from rio_tiler_pds.errors import InvalidLandsatSceneId from rio_tiler_pds.landsat.aws import L8Reader from rio_tiler_pds.la...
#!/usr/bin/python from email.header import Header from ansible.module_utils.basic import AnsibleModule import requests def authenticate(url, user, password, tenant): auth_url = "{0}/authentication/api/v1/sessions/developer".format(url) auth_data = { 'username': user, 'password': password, ...
import torch as ch import numpy as np from lime.lime_text import LimeTextExplainer from tqdm import tqdm from wordcloud import WordCloud import matplotlib import matplotlib.pyplot as plt import seaborn as sns sns.set_style('darkgrid') import os from collections import defaultdict def make_lime_fn(model...
import os import sys import argparse import pickle import json import gym import numpy as np from core.evaluator import ALEvaluator from core.basis import GaussianKernel, RBFKernel2 from core.feature_expectation import MCMuEstimator, LSTDMuEstimator, DeepMuEstimator from core.policy import RandomPolicy2 from core.dat...
""" Deep Interpolation Experiments In this script, we reproduce recent findings from https://arxiv.org/pdf/2110.09485.pdf And in particular, we look at interpolation as a function of the embedding dimension. Balestriero et al. define interpolation as follows: Definition 1. Interpolation occurs for a sample x wheneve...
import os import sys from flask import Flask, render_template, request, url_for, session import oauth2 as oauth # import requests import urlparse import json import tweepy # import unicodedata # For all those who get a chance to have a look at this code..... folks, # must listen to the song "Let Her Go" by The Passeng...
""" Taken from PyPDF2 see (License.PyPDF2) """ import struct from hashlib import md5 # ref: pdf1.8 spec section 3.5.2 algorithm 3.2 _encryption_padding = ( b'\x28\xbf\x4e\x5e\x4e\x75\x8a\x41\x64\x00\x4e\x56' b'\xff\xfa\x01\x08\x2e\x2e\x00\xb6\xd0\x68\x3e\x80\x2f\x0c' b'\xa9\xfe\x64\x53\x69\x7a' ) # Imp...
import pytest import logging import pdb import os from oanda.connect import Connect @pytest.fixture def conn_o(): log = logging.getLogger('connect_o') log.debug('Create a Connect object') # creating a Connect object conn = Connect( instrument="AUD_USD", granularity='D') return con...
import unittest from tilecloud import BoundingPyramid, Bounds, TileCoord class TestBoundingPyramid(unittest.TestCase): def test_empty(self) -> None: bp = BoundingPyramid() self.assertEqual(len(bp), 0) self.assertFalse(TileCoord(0, 0, 0) in bp) self.assertRaises(StopIteration, next...
import base64 import hashlib import json import logging import urllib.request from datetime import datetime from cbor2 import dumps, loads from jwcrypto import jwk from ecdsa import VerifyingKey logging.basicConfig(level=logging.WARN, format='%(asctime)s - %(levelname)s - %(message)s') TRUSTED_I...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ **Project Name:** MakeHuman **Product Home Page:** http://www.makehumancommunity.org/ **Github Code Home Page:** https://github.com/makehumancommunity/ **Authors:** <NAME> **Copyright(c):** MakeHuman Team 2001-2019 **Licensing:** AG...
#!/usr/bin/python # -*- coding: utf-8 -*- import numpy as np import logging import copy import random logging.basicConfig(level=logging.DEBUG) # Cooperate Value coop = 'C' # Defect value dfct = 'D' # Von Newmann type vonNewmann = 'vonNewmann' # Moore type moore = 'moore' vonNewmannSize = 4 mooreSize = 8 class Pl...
""" Library of utilities that can be used for plotting """ import numpy as np from matplotlib import pyplot as plt from matplotlib import cm import cubedsphere.const as c from .utils import _flatten_ds def overplot_wind(ds_reg, U, V, stepsize=1): """ Quick and dirty function for overplotting wind of a regri...
""" Parses data and returns download data. """ import logging import re import string from os import PathLike from os.path import join, realpath, splitext from typing import Dict, List, Optional, Tuple from ..models import (AnimeListSite, AnimeThemeAnime, AnimeThemeEntry, AnimeThemeTheme, AnimeTh...
from core.logging.logger import Logger from blessings import Terminal class AttackSurfaceError(Exception): def __init__(self, message): self.logger = Logger() self.message = message self.logger.log("critical", "AttackSurface : {}".format(self.message)) class AttackSurface(object): de...
from Bio import SeqIO from SNPSeek.Get_variety_snps_from_csv import * from HelperRoutines.CreateTranscriptOrProteinFromGff import * from Bio.SeqRecord import SeqRecord from Bio.Seq import Seq from SNPSeek.RetrieveJsonForLocus import retrieve_json from SNPSeek.ConvertOneJsonToCsv import convert_json_text import os from...
import os import csv import stat import json import networkx as nx from jsonpath_rw import parse import dvc.cloud.base as cloud from dvc.logger import Logger from dvc.exceptions import DvcException from dvc.stage import Stage from dvc.config import Config from dvc.state import LinkState from dvc.lock import Lock from...
''' Responda perguntas divertidas e teste sua inteligência nesse incrível jogo escrito 100% em Python. Aprenda so- bre Tecnologia, Astronomia, Geografia e descubra coisas que você nem imaginava. Jogue muito e acerte o máximo que conseguir. E para que o jogo não venha se tornar monótono, novas atualizações d...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 2 22:59:34 2019 @author: atekawade """ import sys import os import numpy as np import pandas as pd from scipy import misc import h5py import time import configargparse import ast import matplotlib as mpl import matplotlib.pyplot as plt from ct_se...
""" Wrapper classes for the Plantower PMS5003. <NAME> 12/02/2018 """ import logging import time from datetime import datetime, timedelta from serial import Serial, SerialException DEFAULT_SERIAL_PORT = "/dev/ttyUSB0" # Serial port to use if no other specified DEFAULT_BAUD_RATE = 9600 # Serial baud rate to...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (C) <EMAIL> # import os,sys,configparser,getopt import csv import operator,itertools # 1、对单个文件按主列(gene_name (mus_musculus_ensembl_v80_Genes))对行进行分组 # 2、对单个文件分组后的每一组按找从列(Frequency)求和 # note: # 分组的原则根据主列中每一行的名字,进行归类,同名归属一组 # 3、支持文件批量求和,从整体上看,对位于不同文件的主列进行分组,原则同上。...
import re import pandas as pd import glob import numpy as np # group report column headings COL_NAMES_FRONT = ["Unique ID", "Family name", "Given name", "Middle names", "Username", "DOB", "Gender", ...
# local imports from .util import aws_cli from .visualization import create_viz_link_from_json, get_neuroglancer_json import pathlib import subprocess import shlex import requests as r import numpy as np import h5py from cloudvolume import CloudVolume from collections import defaultdict import uuid import argparse fro...
################################### # coding: utf-8 # Author: ZI,Jinping # History: # 2021-04-06 Initial coding ################################### import os import numpy as np from math import radians,cos,acos,sin,asin,sqrt,ceil,pi,floor import obspy from obspy import Stream import glob import re from obspy impor...
############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
#!/usr/bin/env python """ This represents a directed graph. """ __author__ = "<NAME> <<EMAIL>>" __revision__ = "$Revision: 1.1 $" from logging import getLogger _LOGGER = getLogger("ConstructQuery") class Graph(object): """This represents a directed graph.""" def __init__(self, graph): """The graph is ...
#! /usr/bin/env python import os import argparse import json import cv2 from scipy.special import expit #from utils.utils import makedirs, correct_yolo_boxes, decode_netout, bbox_iou #from utils.bbox import draw_boxes, draw_boxes_detection_only from keras.models import load_model from tqdm import tqdm import numpy as ...
# -*- coding: utf-8 -*- """ Created on Mon Jul 20 09:43:34 2020 @author: Nikki """ #referencing https://github.com/aqeelanwar/SocialDistancingAI import cv2 import sys import csv import transform as tform import numpy as np import os.path # Goal Input: csv file with ip address, length, width # Output: csv file...
#! /bin/python # $Id # ----------------------------------------------------------------------------- # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 <NAME> # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. # # This Source Code may also be made available und...
import sh import re import os import json import time import base64 import sys import argparse from distutils.spawn import find_executable import shortuuid from wandb.kubeflow import pipeline_metadata from wandb.apis import InternalApi from wandb import CommError if not find_executable("arena"): if find_executabl...
import src.third_party.imageAugmentation.imgaug as libRoot from src.third_party.imageAugmentation.imgaug import augmenters as lib import time import numpy as np import settings.DataSettings as dataSettings def _augmentedByAllMethods(): sometimes = lambda aug: lib.Sometimes(0.5, aug) augmentMethod = lib.Sequential([ ...
import event.util from event.io.readers import EventReader import gzip from event.arguments.prepare.event_vocab import TypedEventVocab, EmbbedingVocab from event.arguments.prepare import word_vocab from event.arguments.prepare.slot_processor import ( SlotHandler, get_simple_dep, is_propbank_dep) from collections im...
import paramiko import sys import yaml import os import gnupg import pprint import json import csv class File(): def __init__(self, file_name): self.file = open(file_name, 'r') return def encrypt(self, gpg_key_user, gpg_output_file, log_file, gnupg_home="", verbose=False): log_out =...
from ctypes import * from numpy.ctypeslib import ndpointer import numpy as np lib = cdll.LoadLibrary('./bmm.dylib') # here we CREATE A CUSTOM C TYPE # StimMat = c_double * 12 # here you must specify the size # with a POINTER, you can pass arrays to C, without specifying the size of the array StimMat = POINTER(c_doubl...
"""Wrappers for `einops <https://einops.rocks/>`_. The einops module is available only from ``xarray_einstats.einops`` and is not imported when doing ``import xarray_einstats``. To use it you need to have installed einops manually or alternatively install this library as ``xarray-einstats[einops]`` or ``xarray-einstat...
# Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function, division __all__ = ["Atmo_BTSettl7_spectro", "Read_BTSettl7"] import sys from astropy.io import fits from ..Utils.import_modules import * from .. import Utils from .Atmo import Atmo_grid logger = logging.getLogger(__...
import tkinter import sys import getopt import time import threading import os import random import enum import racemap import racecar import racecolor def callback(event): """ Reacts to a user click on the window """ # switch on the status global status # if still initializing, ignore the click and don't do a...
# Copyright 2016 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...
#!/GPFS/zhangli_lab_permanent/zhuqingjie/env/py3/bin/python ''' @Time : 11.19 0019 上午 10:22 @Author : zhuqingjie @User : zhu @FileName: result_show.py @Software: PyCharm ''' import cv2, random, os, json, time, sys import numpy as np sys.path.append('..') from color import Colored as C print_ = lambda x: print...
import numpy as np import scipy.constants as cst from scipy.interpolate import interp1d import os def laser_gain_step(J_in, g_in): """ Computes one iteration of Frantz-Nodvik gain simulation, and returns the output normalised fluence and the gain left in the crystal. J is a number, g is a number ...
from pyramid_chameleon.zpt import ZPTTemplateRenderer from pyramid.config.views import preserve_view_attrs from pyramid.httpexceptions import HTTPForbidden from pyramid.interfaces import IAuthenticationPolicy from pyramid.interfaces import IAuthorizationPolicy from pyramid.interfaces import IDebugLogger from pyramid.in...
from collections import namedtuple import math import sys from morton import Morton try: from shapely import geometry as shapely_geometry except ImportError: shapely_geometry = None Point = namedtuple('Point', ['x', 'y']) def is_point_on_line(point, start, end): if start.x <= point.x and point.x <= end....
import sys sys.path.append('../') from pycore.tikzeng import * from pycore.blocks import * def createChain(block_fn,args_dict,start_from,base_name,multiple,widths,colors): name = base_name + "1" args_dict['name'] = name args_dict['to'] = start_from args_dict['width'] = widths[0] args_dict['color'...
import os, random, shutil, subprocess, string, logging, tempfile, re from typing import Callable, List from termcolor import colored from enum import Enum import prettytable import testcases def random_string(length: int): """ Generate a random string of fixed length """ letters = string.ascii_lowercase return...
import uuid from django.db import models from django.contrib.postgres.fields import ArrayField from game.const import ( ONE_6, ONE_5, TWO_6, TWO_5, SCORE_6, SCORE_5 ) GRID_SIZE = 15 def generate_empty_grid(): return [[0 for x in range(GRID_SIZE)] for y in range(GRID_SIZE)] class Game(m...
# Copyright (c) 2017 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, ...
# Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2015-2017 Nervana Systems 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 ...
import argparse import report as rp import pandas as pd import numpy as np import pweave import os import shutil def create_parser(dir_path=os.path.dirname(os.path.realpath(__file__))): parser = argparse.ArgumentParser(prog="Reportes", description="Report creation utility for ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest.mock import pytest import numpy as np from graphdot.model.gaussian_process import LowRankApproximateGPR np.random.seed(0) @pytest.mark.parametrize('X', [ np.arange(25), np.linspace(0, 1, 25), np.linspace(-1, 1, 25), ]) @pytest.mark.parametrize...
from pathlib import Path import numpy as np import pytest import bmds @pytest.fixture(scope="session") def vcr_config(): return { "filter_headers": [("authorization", "<omitted>")], } @pytest.fixture(scope="session") def data_path(): return Path(__file__).parent.absolute() / "data" @pytest.f...
#!/usr/bin/env python3 import os import re import time import hydra import omegaconf import torch from tqdm import tqdm import wandb from envs.obs_transforms import ( OBS_TRANSFORMS, RECORD_TRANSFORMS, obs_transform_default, record_transform_default, ) import buffers import utilities as utils class ...
import pyautogui import sqlite3 from sqlite3 import Error def create_connection(path): connection = None try: connection = sqlite3.connect(path) #print("Connection to SQLite DB successful") except Error as e: print(f"The error...
# Copyright 1996-2020 Soft_illusion. # # 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 w...
import sklearn import tensorflow as tf import tensorflow_probability as tfp from rlutils.tf.callbacks import EpochLoggerCallback from rlutils.tf.distributions import make_independent_normal_from_params, apply_squash_log_prob, \ make_independent_centered_beta_from_params, make_independent_truncated_normal, make_inde...
import json import time import urllib2 from collections import OrderedDict from threading import Lock from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from SocketServer import ThreadingMixIn with open("key.txt") as f: key = f.read() regionToLocationMap = { "br" : "br1", "eune" : "eun1", ...
import tensorflow as tf import tensorflow_hub as hub import numpy as np import pickle import os from tensorflow.keras.utils import to_categorical cls_num = 5 def read_data(filename): """ This function reads the data from .txt file. :param filename: reading directory :return: lists of word_i...
# -*- coding: utf-8 -*- """Download and pre-process SQuAD and GloVe datasets Usage: > source activate squad > python setup.py Pre-processing code adapted from: > https://github.com/HKUST-KnowComp/R-Net/blob/master/prepro.py > https://github.com/chrischute/squad Author: <NAME> (<EMAIL>) """ import ...
# coding=utf-8 import os import socket import subprocess import sys import threading import time import traceback from threading import Thread import grpc from json import dumps from concurrent import futures from netutils import get_host_ip, get_docker0_IP from utils.exception import ExecuteException from utils.k8s ...
# Copyright 2019 Illumio, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
import io import os import re import sys import csv import urllib import itertools from collections import defaultdict from indra.databases import hgnc_client hgnc_fam_url = ('ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/csv/' 'genefamily_db_tables/') gene_fam_file = 'gene_has_family.csv' family_fil...
from json import loads, dumps from typing import Dict, List, Union from django.db.models import Model, Max from rest_framework.serializers import Serializer from imblearn.pipeline import Pipeline from apps.analysis_and_training.main.significant_terms import ( MarkUpEntities, BugResolutions, ) from apps.extrac...
#!/usr/bin/env python """ Plotting helper functions related to the Reaction Plane Fit. .. code-author: <NAME> <<EMAIL>>, Yale University """ import logging import numpy as np from typing import Any, Callable, Dict, Tuple from pachyderm import histogram from reaction_plane_fit import base from reaction_plane_fit im...
# -*- coding: utf-8 -*- import numpy as np import networkx as nx import scipy.sparse as sp import random random.seed(1001) np.random.seed(121) def adj_nhood(adj, nhood): adj = adj.tocsr() mt = sp.eye(adj.shape[0], format='csr') for _ in range(nhood): mt = mt * adj indices = mt.nonzero() mt...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 1 20:01:24 2021 @author: thomas inspiration: https://pypi.org/project/numpy-stl/ Goal: Make multiple blocks of different height in a 2D plane, in a 3D space """ from stl import mesh # numpySTL import numpy as np import matplotlib.pyplot as plt fr...
''' Quick sort implementations and selection sort comparison baseline. ''' import random import pandas as pd import numpy as np import timeit from collections import defaultdict import matplotlib.pyplot as plt import os import sys sys.path.append(os.path.abspath(os.path.join(os.getcwd(), os.pardir))) ...
import glob import json import os from ozeu.utils.coco import CocoDatasetBuilder import subprocess import tempfile from collections import deque from os.path import join import click import cv2 import numpy as np import tqdm import yaml from ozeu.detection.instance_segmentation import InstanceSegmenter from ozeu.segme...
import base64 import datetime import re import string from dateutil.parser import parse as dateparse from snakeoil.osutils import sizeof_fmt from ... import utc, const from ...objects import Item, Change, Comment, Attachment, decompress from ...utils import nonstring_iterable def parsetime(time): if not isinsta...
from typing import Union, Optional import pytest import scanpy as sc import cellrank.external as cre from anndata import AnnData from cellrank.tl.kernels import ConnectivityKernel from cellrank.external.kernels._utils import MarkerGenes from cellrank.external.kernels._wot_kernel import LastTimePoint import numpy as ...
import argparse import json import math from argparse import RawTextHelpFormatter from leaderboard.utils.checkpoint_tools import fetch_dict import carla import os SCENARIO_COLOR = { "Scenario1": [carla.Color(255, 0, 0), "Red"], # Red "Scenario2": [carla.Color(0, 255, 0), "Green"], # Green "Sc...
from http.server import HTTPServer, BaseHTTPRequestHandler import jwt from datetime import datetime import os import json from urllib.parse import urlparse, parse_qs from collections import namedtuple TokenStruct = namedtuple("TokenStruct", "encoded_token date") SECRET_KEY = "SECRET_KEY" codes_dict = { "Live View": "...
#!/usr/bin/env python3 import re import sys from argparse import ArgumentParser from tqdm import tqdm from constants import document_list_url, wordhoard_list_url, custom_topics_url from new_batches import state_dir from oauth_helpers import oauth_client from wordhoard_helpers import post_wordhoard_payload, find_super...
# -*- coding: utf-8 -*- """ Author: <NAME> <<EMAIL>> License: MIT """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from stochopy import Evolutionary from .dispersion_curve import DispersionCurve from .thomson_haskell import ThomsonHaskell from ._lay2vel import ...
import os import re import requests import uuid from bs4 import BeautifulSoup from django.conf import settings from django.core.files import File from django.core.files.temp import NamedTemporaryFile from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ fro...
# This Software (Dioptra) is being made available as a public service by the # National Institute of Standards and Technology (NIST), an Agency of the United # States Department of Commerce. This software was developed in part by employees of # NIST and in part by NIST contractors. Copyright in portions of this softwar...
from odynn import optim, utils import pandas as pd import seaborn as sns import pylab as plt import numpy as np from odynn.models import cfg_model from odynn import neuron as nr from odynn import nsimul as ns from sklearn.decomposition import PCA def corr(df): corr = df.corr() # Set up the matplotlib figur...
import dataclasses import json import logging import os import time import yaml from consul import Timeout from typing import Any, Dict, List, Set, Tuple from web3 import HTTPProvider, Web3 from web3.exceptions import MismatchedABI from web3.middleware import geth_poa_middleware from polyswarmdconfig.config import Co...
import os import re from os.path import join, basename from operator import itemgetter from collections import Counter, namedtuple from itertools import groupby, izip_longest from anadama import util from anadama.pipelines import Pipeline from .. import settings from .. import general, sixteen, biom, usearch from . ...
# Copyright (c) 2020 by Farsight Security, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
import collections import re from . import ( base, props, ) STORAGE_CONTROLLER_NAME_RE = re.compile("^storagecontrollername(\d+)$") def cls_name_gen(fld, idx): return "storagecontroller{}{}".format(fld, idx) class MountedMedium(base.SubEntity): def __init__(self, controller, medium, slot): s...
# -*- coding: utf-8 -*- from __future__ import print_function import caffe from caffe import layers as L from caffe import params as P from google.protobuf import text_format #import inputParam import os import sys import math sys.path.append('../') from username import USERNAME from yoloParam import yolo_Param from ss...
# Standard library from os import path import glob import re # Third-party import astropy.units as u from astropy.constants import G from astropy.table import QTable import numpy as np from scipy.integrate import simps from scipy.interpolate import interp1d from scipy.stats import truncnorm from sklearn.neighbors.kde ...
from datetime import date, datetime from typing import List, Optional, OrderedDict, Union import numpy as np import torch import selfies as sf import pandas as pd from tqdm import trange, tqdm from globals import device from rxitect import tensor_utils from rxitect.models.lightning.generator import Generator from rxit...
# add_mesh_twisted_torus.py Copyright (C) 2009-2010, <NAME> # tuga3d {at} gmail {dot} com # add twisted torus to the blender 2.50 add->mesh menu # ***** 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 pu...
#!/usr/bin/env python #coding: utf-8 ''' Created on Feb 1, 2018 @author: cs540 team I ''' from __future__ import (print_function, absolute_import, division, unicode_literals) try: from future_builtins import * # @UnusedWildImport import codecs # python-2 open = ...
import torch import numpy as np from torch.autograd import Variable import torch.nn as nn def cosine_sim(im, s, t=1): """Cosine similarity between all the image and sentence pairs """ return im.mm(s.t()) def order_sim(im, s, t=1): """Order embeddings similarity measure $max(0, s-im)$ """ Ym...
import argparse import contextlib import irods.lib from irods import database_connect, database_interface from irods.configuration import IrodsConfig #-------------------------------------- # update_deprecated_database_columns.py # # Several columns in R_DATA_MAIN are obsolete/no longer updated as of 4.2: # resc_...