text
stringlengths
3.07k
22.1k
import pandas as pd from sklearn.pipeline import Pipeline from sklearn.ensemble import GradientBoostingClassifier from sklearn.metrics import confusion_matrix, roc_auc_score from category_encoders import MEstimateEncoder import numpy as np from collections import defaultdict import os from sklearn.metrics import roc_au...
# -*- coding: utf-8 -*- """ Created on Fri Jan 15 11:43:21 2021 @author: Sander """ import random # TODO: '/poll vote 88' has no output # : invalid poll id gives no output # Poll datastructure # # { # "number or name of person": # { # "__id" : unique id for every poll # "__name...
import hashlib import json import math import os import dill import base64 from sys import exit import requests from bson import ObjectId from Crypto.Cipher import PKCS1_OAEP from Crypto.Hash import SHA256 from Crypto.PublicKey import RSA #from cryptography.hazmat.primitives.asymmetric import padding #from cryptography...
r""" This module is a ITK Web server application. The following command line illustrates how to use it:: $ python .../server/itk-tube.py --data /.../path-to-your-data-file --data Path to file to load. Any WSLink executable script comes with a set of standard arguments that ca...
# file eulxml/xmlmap/cerp.py # # Copyright 2010,2011 Emory University Libraries # # 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 # ...
# Copyright 2018 <NAME>, <NAME>. # (Strongly inspired by original Google BERT code and Hugging Face's code) """ Fine-tuning on A Classification Task with pretrained Transformer """ import itertools import csv import fire import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader import toke...
""" basic.py : Some basic classes encapsulating filter chains * Copyright 2017-2020 Valkka Security Ltd. and <NAME> * * Authors: <NAME> <<EMAIL>> * * This file is part of the Valkka library. * * Valkka is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Publi...
import re import time import requests from telethon import events from userbot import CMD_HELP from userbot.utils import register import asyncio import random EMOJIS = [ "😂", "😂", "👌", "💞", "👍", "👌", "💯", "🎶", "👀", "😂", "👓", "👏", "👐", "🍕", "💥...
# -*- coding: utf-8 -*- """" Bandidos estocásticos: introducción, algoritmos y experimentos TFG Informática Sección 8.4.4 Figuras 26, 27 y 28 Autor: <NAME> """ import math import random import scipy.stats as stats import matplotlib.pyplot as plt import numpy as np def computemTeor(n,Delta): if Del...
import copy import datetime import os import random import traceback import numpy as np import torch from torch.utils.data import DataLoader from torchvision.utils import save_image from inference.inference_utils import get_trange, get_tqdm def init_random_seed(value=0): random.seed(value) np.random.seed(va...
# Copyright 2019 <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...
"""This module contains the code related to the DAG and the scheduler.""" from pathlib import Path import matplotlib.pyplot as plt import networkx as nx import numpy as np from matplotlib.colors import LinearSegmentedColormap from mpl_toolkits.axes_grid1 import make_axes_locatable from networkx.drawing import nx_pydot...
import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import statsmodels.api as sm import datetime as dt from statsmodels.stats.multitest import fdrcorrection from pylab import savefig # FUNCTIONS YOU CAN USE: # analyses(filepath) spits out a nifty heatmap to let you check ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 2D linear elasticity example Solve the equilibrium equation -\nabla \cdot \sigma(x) = f(x) for x\in\Omega with the strain-displacement equation: \epsilon = 1/2(\nabla u + \nabla u^T) and the constitutive law: \sigma = 2*\mu*\epsilon + \lambda*(\nabla\cdot u)I,...
import datetime import os import sys from cmath import inf from typing import Any import hypothesis.extra.numpy as xps import hypothesis.strategies as st import numpy import pytest from hypothesis import assume, given from eopf.product.utils import ( apply_xpath, conv, convert_to_unix_time, is_date, ...
# -*- coding: utf-8 -*- # SPDX-License-Identifier: MIT from __future__ import absolute_import, print_function, unicode_literals import os import shutil try: from unittest.mock import MagicMock except ImportError: from mock import MagicMock import uuid from ddt import ddt as DataDrivenTestCase, data as ddt_da...
# Stat_Canada.py (flowsa) # !/usr/bin/env python3 # coding=utf-8 ''' Pulls Statistics Canada data on water intake and discharge for 3 digit NAICS from 2005 - 2015 ''' import pandas as pd import io import zipfile import pycountry from flowsa.common import * def sc_call(url, sc_response, args): """ Convert res...
""" Test functions for regular module. """ import pytest import numpy as np from sklearn.linear_model import LinearRegression, LogisticRegression from sklearn.base import clone import tensorflow as tf from tensorflow.keras import Sequential, Model from tensorflow.keras.layers import Dense from tensorflow.keras.optimiz...
#!/usr/bin/env python # # soaplib - Copyright (C) Soaplib contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any late...
############################################################################## # Copyright (c) 2016 <NAME> and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at #...
from flask import Flask, request, jsonify, abort, render_template, redirect, session, url_for import MySQLdb.cursors import hashlib import html import json import math import os import pathlib import random import re import string import urllib import sys from werkzeug.contrib.profiler import ProfilerMiddleware, MergeS...
import os.path import scipy.io as sio import numpy as np # for algebraic operations, matrices import keras.models from keras.models import Sequential from keras.layers.core import Dense, Activation, Flatten, Dropout # , Layer, Flatten # from keras.layers import containers from keras.models import model_from_json,Mode...
# -*- coding: utf-8 -*- from flask import flash, make_response, request import json from flask_babel import lazy_gettext, gettext from datetime import datetime from flask_login import current_user from flask_appbuilder.actions import action from flask_appbuilder import expose from flask import redirect from plugins.com...
#!/usr/bin/env python3 import sys,re,os,re, datetime import requests import json import hashlib import getopt from pprint import pprint from pathlib import Path ################################################################################ ## Hashing large files ####################################################...
bl_info = { "name": "Import Planar Code", "author": "<NAME>", "version": (1, 0), "blender": (2, 80, 0), "location": "File > Import > Planar Code", "description": "Import planar code and construct mesh by assigning vertex positions.", "warning": "", "support": "TESTING", "wik...
import argparse import collections import os import cv2 import numpy as np import pandas as pd import pretrainedmodels import torch import torch.optim as optim import torchsummary from torch.optim import lr_scheduler from torch.utils.data import DataLoader from torchvision import datasets, models, transforms from tqdm...
import functools import numpy as np def dft2(f, alpha, npix=None, shift=(0, 0), offset=(0, 0), unitary=True, out=None): """Compute the 2-dimensional discrete Fourier Transform. This function allows independent control over input shape, output shape, and output sampling by implementing the matrix triple p...
from multiprocessing.dummy import Value from agents.Base_Agent import Base_Agent import copy import numpy as np import torch import torch.nn.functional as F from torch.optim import Adam class RunningMeanStd(object): # https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm def _...
from __future__ import absolute_import from __future__ import print_function import unittest from aiida.manage.fixtures import PluginTestCase import subprocess, os def backend_obj_users(): """Test if aiida accesses users through backend object.""" backend_obj_flag = False try: from aiida.backends...
import pandas as pd import yaml import gzip import re import urllib import shutil # for removing and creating folders from pathlib import Path from tqdm.autonotebook import tqdm import warnings from Bio import SeqIO from Bio.Seq import Seq from .cloud_caching import CLOUD_CACHE, download_from_cloud_cache CACHE_PATH...
#!/usr/bin/env python from __future__ import print_function import sys sys.path.insert(0, "/home/liangjiang/code/keras-jl-mean/") from keras.datasets import cifar10 from keras.preprocessing.image import ImageDataGenerator from keras.models import model_from_json from keras.models import Sequential from keras.layers imp...
from builtins import str import collections import contextlib import functools import itertools import io import os import re import six import subprocess import threading import tempfile import time import traceback import termcolor from . import command from . import parser COLORS = ['yellow', 'blue', 'red', 'gre...
""" Model construction utilities based on keras """ import warnings from distutils.version import LooseVersion import tensorflow.keras from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Activation, Flatten # from cleverhans.model import Model, NoSuchLayerError import tensorflow a...
""" paw_structure.ion ----------------- Ion complex detection using geometric :ref:`algorithm<Control_ION_algorithm>`. Main routine is :func:`.ion_find_parallel`. Dependencies: :py:mod:`functools` :py:mod:`miniutils` :py:mod:`numpy` :py:mod:`pandas` :mod:`.neighbor` :mod:`.utility` :class:...
import re import _pickle as cPickle import logging import argparse #This script is not dependant on table of contents. It detects books and chapters based their titles # Dictionary containing key and regex pattern to match the keys pattern_dict = { 'blank_line': re.compile(r'^\s*$'), 'book_number': re.compile...
from numpy.random import seed seed(5393) from tensorflow import set_random_seed set_random_seed(12011) import os import numpy as np import pandas as pd from scipy import sparse from sklearn.preprocessing import LabelEncoder, LabelBinarizer from sklearn.pipeline import FeatureUnion from sklearn.feature_extraction.te...
import math from itertools import product from typing import Tuple, List, Optional, Union import numpy as np import torch import torch.nn as nn import torch.nn.init as init class EMA: """ Class that keeps track of exponential moving average of model parameters of a particular model. Also see https://gith...
# -*- coding: utf-8 -*- import matplotlib.colors as colorplt import matplotlib.pyplot as plt import numpy as np from sktime.distances._distance import distance_alignment_path, pairwise_distance gray_cmap = colorplt.LinearSegmentedColormap.from_list("", ["#c9cacb", "white"]) def _path_mask(cost_matrix, path, ax, the...
"""Finds out all the people you need to follow to follow all the same people as another user. Then, optionally, follows them for you.""" import configparser import csv import errno import os import tweepy from tqdm import tqdm #Useful Constants PATH_TO_TARGET_CSV = "./output/targetfriends.csv" PATH_TO_USER...
import inspect from IPython.core.interactiveshell import InteractiveShell from IPython.core.magic import cell_magic, magics_class, Magics from IPython.core.magic_arguments import (argument, magic_arguments, parse_argstring) import warnings from htools.meta import timebox @ma...
# p2wsh input (2-of-2 multisig) # p2wpkh output import argparse import hashlib import ecdsa def dSHA256(data): hash_1 = hashlib.sha256(data).digest() hash_2 = hashlib.sha256(hash_1).digest() return hash_2 def hash160(s): '''sha256 followed by ripemd160''' return hashlib.new('ripemd160', hashlib.s...
#!/usr/bin/env python """Module for global fitting titrations (pH and cl) on 2 datasets """ import os import sys import argparse import numpy as np from lmfit import Parameters, Minimizer, minimize, conf_interval, report_fit import pandas as pd import matplotlib.pyplot as plt # from scipy import optimize def ci_repo...
# Recipe creation tool - create command build system handlers # # Copyright (C) 2014 Intel Corporation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed...
import pytest import numpy as np import pandas as pd from SPARTACUS10 import spatial_silhouette as spasi import sklearn.metrics as metrics import os def find_path(name, path = None): if path is None: path = os.getcwd() for root, dirs, files in os.walk(path): if name in files: ...
# iPhone Manager bot by Oldmole # No support will be provided, this code is provided "as is" without warranty of any kind, either express or implied. Use at your own risk. # The use of the software and scripts is done at your own discretion and risk and with agreement that you will be solely responsible for any damage ...
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import textwrap import time import bs4 from django.core.urlresolvers import get_resolver from django.http import HttpResponse from django.http import HttpResponseBadRequest from django.http i...
# Copyright 2017-2020 TensorHub, 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 writ...
r"""Provides functions used by strategies that use a tree to select the permutation. To compute optimal permutations, we use the belief states .. math:: b(y^{k-1}) := \mathbb{P}(s_0, s_k|y^{k-1}), where the :math:`s_k` are the states of the HMM at step :math:`k`, and the superscript :math:`y^{k-1}` is the sequen...
# Get arxiv data import json import logging import os import pickle from collections import Counter from datetime import datetime from io import BytesIO from zipfile import ZipFile import numpy as np import pandas as pd import requests from kaggle.api.kaggle_api_extended import KaggleApi from eurito_indicators impor...
from dataclasses import dataclass, field from itertools import chain from typing import Optional from talon import Context, Module, actions, app, cron, ui # XXX(nriley) actions are being returned out of order; that's a problem if we want to pop up a menu mod = Module() mod.list("notification_actions", desc="Notific...
import discord import random from asd import * from mtgsdk import Card from mtgsdk import Set from mtgsdk import Type from mtgsdk import Supertype from mtgsdk import Subtype from mtgsdk import Changelog client=discord.Client() @client.event async def on_ready(): print('logged in as') print...
# -*- coding: utf-8 -*- # # <NAME> 2021 gpSTS ########################################### ###Configuration File###################### ###for gpSTS steering of experiments###### ########################################### import os import numpy as np from gpsts.NanonisInterface.nanonis_interface import Nanonis from gps...
from mach_utils import * import logging from argparse import ArgumentParser from fc_network import FCNetwork import tqdm from dataset import XCDataset,XCDataset_massive import json from typing import Dict, List from trim_labels import get_discard_set from xclib.evaluation import xc_metrics from xclib.data import data_u...
import crypt import io import json import logging import re import requests import uuid import yaml from flask import current_app as app from base64 import b64encode from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.backends imp...
#!/usr/bin/env python # hsslms.py # # This provides a command line interface for the pyhsslms.py # implementation of HSS/LMS Hash-based Signatures as defined # in RFC 8554. # # # Copyright (c) 2020-2021, Vigil Security, LLC # All rights reserved. # # Redistribution and use, with or without modification, are permitted ...
#!/usr/bin/python import os, glob, hashlib, pickle, argparse, shutil, ntpath import os, glob, hashlib, pickle, argparse, shutil, multiprocessing, signal, sys from multiprocessing import Pool from functools import partial ######################### Classes ############################## class AndroidDensity: def __i...
from typing import * from dataclasses import asdict from transformers import BertModel from torch.nn.utils.rnn import pad_sequence from stud.models.ner_classifier import NERClassifier from stud.models.polarity_classifier import PolarityClassifier from stud.constants import LOGGER_TRAIN_LOSS, LOGGER_VALID_LOSS, LOGGER_T...
################################################## # # Tests for model.py # # # # # # # # # # # ################################################## from boole.core.model import * from boole.core.language import clear_default_language from nose.tools import * def is_prime(x): if x == 0 or x == 1: return Fa...
""" Low level miscilanious calls """ import UserDict import types import random import datetime import pprint import re import unicodedata import logging log = logging.getLogger(__name__) now_override = None def now(): """ A passthough to get now() We can override this so that automated tests can fake ...
import os import zipfile from typing import List, Tuple, Dict import numpy as np import pandas as pd import requests import structlog import matplotlib.pyplot as plt from sklearn.ensemble import RandomForestClassifier from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.model_selection import train...
import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import numpy as np import torch.nn.functional as F from attention import AdditiveAttention class Encoder(nn.Module): """Encoder bi-GRU""" def __init__(self, input_dim, char_embed_dim, e...
import datetime import os import time from enum import Enum import sys from MediaPlayer.Player import vlc from MediaPlayer.Player.vlc import libvlc_get_version, Media, MediaList from Shared.Events import EventManager, EventType from Shared.Logger import Logger, LogVerbosity from Shared.Observable import Observable fr...
import os import aiohttp import asyncio import json import time import datetime import logging import gidgethub import requests from gidgethub import aiohttp as gh_aiohttp import sys import pandas as pd sys.path.append("..") from utils.auth import get_jwt, get_installation, get_installation_access_token from utils.test...
import numpy as np import tensorflow as tf def deconv_layer(output_shape, filter_shape, activation, strides, name): scale = 1.0 / np.prod(filter_shape[:3]) seed = int(np.random.randint(0, 1000)) # 123 with tf.name_scope('conv_mnist/conv'): W = tf.Variable(tf.random_uniform(filter_shape, ...
""" Copyright (C) 2022 <NAME> Released under MIT License. See the file LICENSE for details. This module describes 2D/3D tracks. GUTS's output is a list of instances of these classes. """ import numpy as np from filter import filter2D, filter3D from options import Options, Filter2DParams, Filter3DPa...
import argparse import os import torch import matplotlib.pyplot as plt from torch.utils.data.distributed import DistributedSampler from torch import distributed as dist from torch import optim from tqdm import tqdm from torch_ema import ExponentialMovingAverage from cifr.core.config import Config from cifr.models.bui...
import numpy as np import matplotlib.pyplot as plt from docx import Document from docx.shared import Cm import math def split_file(file): """split the file by different queries into seperate list element and return one list as a whole. """ answer = [[]] j = 0 for i in file: if i == "\n": ...
''' Collect results in Quantum ESPRESSO ''' import sys import numpy as np from pymatgen.core import Structure from . import structure as qe_structure from ... import utility from ...IO import pkl_data from ...IO import read_input as rin def collect_qe(current_id, work_path): # ---------- check optimization in ...
# -*- coding: utf-8 -*- """ Created on Thu Mar 10 13:52:52 2022 @author: sarangbhagwat """ from biorefineries.TAL.system_TAL_adsorption_glucose import * from matplotlib import pyplot as plt import numpy as np column = AC401 #%% Across regeneration fluid velocity and cycle time def MPSP_at_adsorption_design(v, t): ...
from m5stack import * from m5stack_ui import * from uiflow import * from ble import ble_uart import face screen = M5Screen() screen.clean_screen() screen.set_screen_bg_color(0x000000) mb_click = None rb_click = None lb_click = None snd_val = None st_mode = None stval = None prval = None faces_encode = face.get(face...
import scipy.sparse as ssp import scipy.sparse.csgraph as csgraph import networkx as nx import pylab as pl import pygraphviz as pgv from itertools import product, chain class DiGraph(ssp.lil_matrix): """ An implementation of a directed graph with a Sparse Matrix representation using Scipy's sparse module. ...
## ## Software PI-Net: Pose Interacting Network for Multi-Person Monocular 3D Pose Estimation ## Copyright Inria and UPC ## Year 2021 ## Contact : <EMAIL> ## ## The software PI-Net is provided under MIT License. ## #used in train for skeleton input import os import os.path as osp import numpy as np import math from ut...
from __future__ import absolute_import from sklearn.exceptions import NotFittedError from sklearn.neighbors import KernelDensity from sklearn.linear_model import LinearRegression, LogisticRegression import pickle import os import matplotlib.pylab as plt from sklearn.externals import joblib import numpy as np from sklea...
#!/usr/bin/env python """Generates a poller file that will be used as input to runsinglehap.py, hapsequencer.py, runmultihap.py or hapmultisequencer.py based on the files or rootnames listed user-specified list file. USAGE >>> python drizzlepac/haputils/make_poller_files.py <input filename> -[ost] - input fil...
import os, pickle import os.path as osp import numpy as np import cv2 import scipy.ndimage as nd import init_path from lib.dataset.get_dataset import get_dataset from lib.network.sgan import SGAN import torch from torch.utils.data import DataLoader import argparse from ipdb import set_trace import matplotlib.pyplot as...
# -*- coding: UTF-8 -*- import time import simplejson as json from MySQLdb.connections import numeric_part from django.contrib.auth.decorators import permission_required from django.http import HttpResponse from common.utils.extend_json_encoder import ExtendJSONEncoder from common.utils.const import SQLTuning from s...
import logging from bottle import Bottle, request, response, abort, static_file import os import time import threading from threading import Thread from pathlib import Path import json import subprocess import io import sys import signal from internal.notifier import getNotifier, NotificationLevel from internal.interpr...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, cstr, cint from frappe import _ from frappe.model.meta import get_field_precision from erpnext.accounts.util...
""" Complex Valued Neural Layers From Scratch Programmed by <NAME> * MIT Licence * 2022-02-15 Last Update """ from torch import nn import torch ##__________________________________Complex Linear Layer __________________________________________ class CLinear(nn.Module): def __init__(self, in_channels, ...
import pytest import json import os import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') from glacierbackup.command import _construct_argparse_parser from glacierbackup.jobs import BackupJob from glacierbackup.database import GBDatabase, GBDatabaseError...
import numpy as np import torch import argparse from pina.pinn import PINN from pina.ppinn import ParametricPINN as pPINN from pina.label_tensor import LabelTensor from torch.nn import ReLU, Tanh, Softplus from pina.adaptive_functions.adaptive_softplus import AdaptiveSoftplus from problems.parametric_elliptic_optimal_c...
import pandas as pd import dash from dash.dependencies import Input, Output, State import plotly.express as px import dash_html_components as html import dash_core_components as dcc import dash_bootstrap_components as dbc # self packages from .data_generator import load_transactions, comparisons_df from .nav_bar impor...
# Copyright (c) 2020, <NAME>, Honda Research Institute Europe GmbH, and # Technical University of Darmstadt. # 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 mus...
#!/usr/bin/env python ########################################################################### # Active Inference algorithm # # Execute the AI algorithm using the data from the # /filter/y_coloured_noise topic and publish the results to the # /filter/ai/output topic. # Note that only the filtering part of the AI ...
from utils import load, save, path_list, DEAD_PMTS import nets import torch import numpy as np import pandas as pd from scipy import interpolate import matplotlib.pyplot as plt from matplotlib.ticker import PercentFormatter from itertools import repeat from multiprocessing import Pool def neural_residual(root_dir):...
# Copyright 2018 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Partial response utilities for an Endpoints v1 over webapp2 service. Grammar of a fields partial response string: fields: selector [,select...
############################## ## MFP_K1000.py ## ## <NAME> ## ## Version 2020.03.25 ## ############################## import os import os.path as osp import time import subprocess as spc import numpy as np import scipy as sp import astropy.io.fits as fits import h...
import discord import json import math from discord.ext import commands from common_functions import default_embed_template, use_exp_mat MYSTIC = 10000 FINE = 2000 NORMAL = 400 ASCENSION_MILESTONES = [90, 80, 70, 60, 50, 40, 20] class WeaponExpCalculator(commands.Cog): def __init__(self, client): self._client = c...
import collections import datetime import logging import os import sys from pathlib import Path import numpy as np import pdfkit as pdfkit from bs4 import BeautifulSoup from sklearn.metrics import mean_absolute_error, mean_squared_error, confusion_matrix, classification_report, \ accuracy_score from tldextract imp...
#!/usr/bin/python #The MIT License (MIT) # #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...
# -*- coding: utf-8 -*- """ Functionality for binding wx control label shortcut keys to events automatically. In wx, a button with a label "E&xit" would be displayed as having the label "Exit" with "x" underlined, indicating a keyboard shortcut, but wx does not bind these shortcuts automatically, requiring constru...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Feb 12 10:58:27 2020 Experiments where one marginal is fixed """ import os import numpy as np from joblib import Parallel, delayed import torch import ot from unbalancedgw.batch_stable_ugw_solver import log_batch_ugw_sinkhorn from unbalancedgw._batch_...
""" PatientFinders are used to find OpenMRS patients that correspond to CommCare cases if none of the patient identifiers listed in OpenmrsCaseConfig.match_on_ids have successfully matched a patient. See `README.md`__ for more context. """ import logging from collections import namedtuple from functools import partial...
import os import datetime import math import traceback from typing import List import requests from loguru import logger from lxml import etree from siphon.catalog import TDSCatalog from dask.utils import memory_repr import numpy as np from dateutil import parser from ooi_harvester.settings import harvest_settings ...
import asyncio import math import networkx as nx import ccxt.async_support as ccxt import datetime import logging from .logging_utils import FormatForLogAdapter __all__ = [ 'FeesNotAvailable', 'create_exchange_graph', 'load_exchange_graph', ] adapter = FormatForLogAdapter(logging.getLogger('peregrinearb.u...
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
from __future__ import unicode_literals import logging import re from django.contrib import messages from django.db import ProgrammingError from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect from django.shortcuts import redirect from django.utils.translation import ugettext_lazy as _ fr...
import torch.nn as nn import numpy as np from collections import OrderedDict from torchmeta.modules import (MetaModule, MetaConv2d, MetaBatchNorm2d, MetaSequential, MetaLinear) import torch def conv_block(in_channels, out_channels, **kwargs): return MetaSequential(OrderedDict([ ...
from __future__ import division from collections import defaultdict import itertools import sys import os import sqlite3 import click from kSpider2.click_context import cli import glob class kClusters: source = [] target = [] source2 = [] target2 = [] seq_to_kmers = dict() names_map = dict() ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...