text stringlengths 8.04k 46.5k |
|---|
"""
For License information see the LICENSE file.
Authors: <NAME>, <NAME>
"""
from itertools import chain, repeat
import dill as pickle
from collections import Counter
from functools import reduce
from logging import getLogger
from math import ceil
from os import path
from random import sample, shuffle
from typing ... |
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... |
"""Find template-based model files, read columns, convert them to n-dim hypercubes, store as HDF5.
"""
import os, sys, re, warnings
import numpy as N
import h5py
#from externals.padarray import padarray
import filefuncs
__author__ = "<NAME> <<EMAIL>>"
__version__ = "20180921"
# TODO: add simple logging
class HdfFil... |
# -*- coding: utf-8 -*-
"""
@author: <NAME>
"""
#the original simmaker_v2_pycamb.py
import sys
sys.path.append('../..')
python_version = sys.version_info.major
import numpy as np
if python_version==3:
from configparser import ConfigParser
elif python_version == 2:
import ConfigParser
import codes.PySM_pu... |
"""
Module used to house the bitfine websocket client
"""
import asyncio
import json
import time
import random
from .generic_websocket import GenericWebsocket, AuthError
from .subscription_manager import SubscriptionManager
from .wallet_manager import WalletManager
from .order_manager import OrderManager
from ..utils... |
import wx
import numpy as np
from os import remove
from os.path import splitext, exists
from FileHandler import ReadXYZ
from scipy.signal import butter, filtfilt
from sklearn.decomposition import PCA
class Results():
def __init__(self):
"""EMPTY INITIATION"""
def updateAll(self, Data):... |
from collections import defaultdict
from typing import Iterable, List
import torch
from ppq.core import (COMPELING_OP_TYPES, LINEAR_ACTIVATIONS,
ORT_OOS_FUSE_START_OPS, PPLCUDA_ACTIVATIONS,
QuantizationProperty, QuantizationStates, RoundingPolicy,
Targe... |
"""
Blender API for querying mesh data. Animation data is also
handled here since Three.js associates the animation (skeletal,
morph targets) with the geometry nodes.
"""
import operator
import re
from bpy import data, types, context
from . import material, texture, animation
from . import object as object_
from .. im... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... |
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 4 13:25:26 2021
@author: <NAME>
"""
# In[]: jika terjadi error pada saat running cnn gunakan ini
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = Inte... |
import pandas as pd
import numpy as np
from keras.callbacks import EarlyStopping
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
from scipy.special import digamma
from numpy import linalg as LA
from feature_based.multiclass_opencrowd.nn_em import nn_em
from sklearn.metric... |
'''
Created on Oct 21, 2011
@author: bluec0re
'''
from __future__ import absolute_import, division
import os
import os.path
import sys
import platform
import zipfile
import functools
import tempfile
import wx
import re
import math
from wx import xrc
from cvsscalc import cvsscalc, strings
from wx.lib.masked import Ti... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to update prebuilt versions of the projects."""
import argparse
import glob
import io
import json
import logging
import os
import platform
import re
import subprocess
import sys
from l2tdevtools import presets
from l2tdevtools import projects
from l2tdevtools im... |
"""Call structural variants"""
from __future__ import absolute_import
from __future__ import division
import random
import logging
import collections
import heapq
from .libs import Fastafile
from .io.VcfIO import BedRecord, BedWriter, VcfRecord, VcfWriter, to_pbsv_id
from .io.bamstream import (AnnotateSampleBamStream... |
##################################################
# @copyright <NAME>
# @email <EMAIL>
# @institute University of Colorado Boulder
#
# NN Models for HIRO
# (Data-Efficient Hierarchical Reinforcement Learning)
# Parameters can be find in the original paper
import os
import copy
import time
import glob
import numpy as n... |
### seq_rnn.py
### RNN baseline models for comparisons with fastsk-SVM
### <NAME>, December 2018
### General Imports
import numpy as np
import os
import sys
import shutil
import matplotlib
# A less ad hoc way of setting these backends would be nice
if os.environ["HOME"] == "/Users/derrick":
matplotlib.use("TkAgg"... |
# The piwheels project
# Copyright (c) 2017 <NAME> <https://github.com/bennuttall>
# Copyright (c) 2017 <NAME> <<EMAIL>>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must ... |
import math
import netCDF4 as nc
import iwp.wavelet
# this module provides a framework for generating data transforms in
# systematic, reproducible manner that can also be used in a variety of
# execution contexts, be they serial or parallel. care is taken so that
# transforms can be worked with in both an interacti... |
import math
from simple_playgrounds.playground.layouts import GridRooms, SingleRoom
from simple_playgrounds.playground.playground import PlaygroundRegister
from simple_playgrounds.common.position_utils import CoordinateSampler, Trajectory
from simple_playgrounds.common.timer import CountDownTimer, PeriodicTimer
from s... |
from __future__ import print_function
import os
import ast
import json
import glob
import re
import sys
import demisto_client
from threading import Thread, Lock
from demisto_sdk.commands.common.tools import run_threads_list
from google.cloud.storage import Bucket
from distutils.version import LooseVersion
from typing ... |
import torch
import torch.nn as nn
from cocoapi.layout2im.models.bilinear import crop_bbox_batch
def get_z_random(batch_size, z_dim, random_type='gauss'):
if random_type == 'uni':
z = torch.rand(batch_size, z_dim) * 2.0 - 1.0
elif random_type == 'gauss':
z = torch.randn(batch_size, z_dim)
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of my-weather-indicator
#
# Copyright (c) 2012 <NAME> <a.k.a. atareao>
#
# 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 w... |
import asyncio
import json
import os
import string
from statistics import mean
from typing import Any
import pytz
from django.conf import settings
from django.contrib.postgres.fields import ArrayField
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
from loguru impor... |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 <NAME>
pySME is a Python script to run R SME package
(https://cran.r-project.org/web/packages/sme/index.html). SME package generates
smoothing-splines mixed-effects models from metabolomics data. This script
follows methodology given by Berk et al. (2011) and uti... |
#!/usr/bin/env python
"""Central registry for artifacts."""
from __future__ import unicode_literals
import logging
import os
import threading
from future.utils import iteritems
from future.utils import itervalues
import yaml
from grr_response_core import config
from grr_response_core.lib import artifact_utils
from ... |
import pandas as pd
from matplotlib import pyplot as plt, dates, ticker
from matplotlib.pyplot import setp
from matplotlib.ticker import PercentFormatter
from switch_model.tools.graph.main import graph_scenarios, graph, Scenario
STORAGE_CAPACITY_LEGEND = "Storage Capacity (TWh)"
X_LABEL = "WECC-wide Storage Capacity... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""The log2timeline front-end."""
import argparse
import logging
import multiprocessing
import sys
import time
import textwrap
try:
import win32api
import win32console
except ImportError:
win32console = None
from dfvfs.helpers import source_scanner
import plaso
from p... |
"""
GCore/SolveIK.py
Requires:
sys
numpy
scipy
Grip
ISCV (project, cloud, )
"""
import sys
import numpy as np
import ISCV
from GCore import Character, Recon, list_of_lists_to_splits
import scipy.linalg.lapack as LAPACK
def computeChannelAffectedEffectors(jointCutOff, jointParents, jointChanSplits, effect... |
"""
Functions for plotting
"""
# Authors
# -------
# <NAME>, <NAME>, <NAME>, others...
from __future__ import absolute_import, division, print_function, \
unicode_literals
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
from matplotlib.ticker import FuncFormatter, FixedLocator
import matplotli... |
# coding=utf-8
from __future__ import division
import argparse # Requires Python 2.7, should be safe to use with jython.
import codecs
import datetime
import logging
import os
import subprocess
import sys
logging.basicConfig(level=logging.INFO)
RES_DIR = "src/main/resources/l10n"
URL_BASE = "https://g... |
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the BSD 3-Clause or the CeCILL-B License
# (see codraft/__init__.py for details)
"""
CodraFT main window
"""
# pylint: disable=invalid-name # Allows short reference names like x, y, ...
import locale
import os
import os.path as osp
import platform
import sys
i... |
from __future__ import division
import os, sys, shutil, time, random, math
import argparse
import warnings
import numpy as np
import torch
from torch.optim import SGD
import torch.backends.cudnn as cudnn
import torch.nn.parallel
import torch.distributed as dist
import torch.multiprocessing as mp
import torch.utils.da... |
"""Jax Unet inference implementation."""
from concurrent.futures import thread
import functools
import math
from absl import logging
from flax import nn
import jax
from jax.interpreters import sharded_jit
import jax.numpy as jnp
import numpy as np
from REDACTED.mlperf.submissions.training.v1_0.models.unet3d.data_loa... |
# Copyright 2014 Google Inc. 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 or agr... |
# -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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 requ... |
from __future__ import print_function
import argparse
import codecs
import gc
import json
import random
import sys
import time
import numpy as np
import torch
import torch.autograd as autograd
import torch.optim as optim
from sklearn.metrics import f1_score, accuracy_score, classification_report
from joint_model.joi... |
#!/usr/bin/python
# Copyright: (c) 2020, DellEMC
# GNU General Public License v3.0+
""" Distributed virtual volume module """
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... |
from datetime import datetime
from mongoengine import Document, DynamicDocument
from mongoengine.fields import (
BooleanField,
DateTimeField,
DictField,
IntField,
ListField,
StringField,
ReferenceField,
)
from mongoengine.queryset import CASCADE
from mongoengine import signals
from openele... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import math
import time
import numpy as np
import torch as th
import torch.nn.functional as F
import torch.optim as optim
from ogb.nodeproppred import DglNodePropPredDataset, Evaluator
from scipy import io
from sklearn import metrics
import itertools
impo... |
"""
2021/05/31 <NAME>
Contrastive 모델 클래스
- Siamese network
- CPC network
"""
from .audio_encoders import *
from .emb_aggregators import *
from .abstract_model import AbstractModel
from ..util.util_data import *
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch... |
#from matplotlib.figure import Figure
import plotly.express as px
import plotly.graph_objects as go
from collections import OrderedDict
import numpy as np
import pandas as pd
def make_figure(df,pa):
"""Generates figure.
Args:
df (pandas.core.frame.DataFrame): Pandas DataFrame containing the input data... |
import os;
import sys;
import copy;
import math;
from math import cos, sin, pi
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../scripts"))
from euler_quaternion_quick_converter import euler2quat_converter;
from motoman_configuration import arm_right_home, arm_left_home;
# from calibration import bin_... |
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ##... |
#
# Copyright (C) 2018 ETH Zurich and University of Bologna
#
# 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 applicabl... |
"""
Run SSN-Moment Matching
"""
from __future__ import print_function
import theano
import theano.tensor as T
import lasagne
import numpy as np
from .. import utils
from ..gradient_expressions.utils import subsample_neurons, \
sample_sites_from_stim_space
from ..gradient_expressions import make_w_batch as make... |
#!/usr/bin/env python3
import argparse
import csv
import cv2
import skvideo.io # pip3 install sk-video
import json
import math
import numpy as np
import os
import sys
from props import PropertyNode
import props_json
sys.path.append('../scripts')
from lib import render4geotiff
from lib import transforma... |
# mzxrules 2018
# In order to patch MQ to the existing data...
#
# Scenes:
#
# Ice Cavern (Scene 9) needs to have it's header altered to support MQ's path list. This
# expansion will delete the otherwise unused alternate headers command
#
# Transition actors will be patched over the old data, as the number of records i... |
import errno
import json
import os
import subprocess
import sys
import time
import uuid
import zipfile
import shutil
from Bio import SeqIO
from installed_clients.AssemblyUtilClient import AssemblyUtil
from installed_clients.DataFileUtilClient import DataFileUtil
from installed_clients.KBaseReportClient import KBaseRe... |
#!/usr/bin/env python
"""
nn_manager_gan
A simple wrapper to run the training / testing process for GAN
"""
from __future__ import print_function
import time
import datetime
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import core_scripts.data_io.conf as nii_dconf
import co... |
"""
.. versionadded:: 0.10.0
Asynchronous :class:`~pyhanko.sign.signers.pdf_cms.Signer` implementation for
interacting with a remote signing service using the Cloud Signature Consortium
(CSC) API.
This implementation is based on version 1.0.4.0 (2019-06) of the CSC API
specification.
Usage notes
-----------
This ... |
#!/usr/bin/env python
# Copyright (C) 2015-2021 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHO... |
import sys
import functools
import time
import itertools
import gc
from collections import defaultdict
from typing import Tuple
import numpy as np
import ray
from nums.core.systems import numpy_compute
from nums.core.settings import np_ufunc_map
from nums.core.systems.interfaces import RNGInterface
from nums.core.syst... |
import os
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data as data
import copy
import argparse
import logging
import gc
import datetime
import pprint
from collections import OrderedDict, defaultdict
from functools import partial
from torch.optim... |
try:
from source.Multiprocessing import *
except:
from Multiprocessing import *
def print_citation_mantis():
paper_doi='https://doi.org/10.1093/gigascience/giab042'
separator='##########################################################################################################################'
... |
"""
===============================
XMODEM file transfer protocol
===============================
.. $Id$
This is a literal implementation of XMODEM.TXT_, XMODEM1K.TXT_ and
XMODMCRC.TXT_, support for YMODEM and ZMODEM is pending. YMODEM should
be fairly easy to implement as it is a hack on top of the XMODEM
protocol... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
# Made with the posibilitiy of PyQt5 and Python
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
import numpy as np
from multiprocessing import Pool
from struct import pack, unpack
from numba import jit, jitclass
from numba import int32
import sys
from decimal import *
from mpmath imp... |
import os
import sys
from numpy.core.numeric import zeros_like
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
plt.style.use('seaborn-poster')
# I hate this too but it allows everything to use the same helper functions.
sys.path.insert(0, 'model')
from helper_functions impor... |
"""Actions for linking object code produced by compilation"""
load(":private/packages.bzl", "expose_packages", "pkg_info_to_ghc_args")
load("@bazel_skylib//lib:paths.bzl", "paths")
load(
":private/path_utils.bzl",
"get_lib_name",
"is_shared_library",
"is_static_library",
"ln",
)
load(":private/pkg_... |
# Copyright 2018 <NAME> <<EMAIL>>
# 2018 <NAME> <<EMAIL>>
#
# This file is part of PyDDM, and is available under the MIT license.
# Please see LICENSE.txt in the root directory for more information.
import numpy as np
import sys
import traceback
from paranoid.settings import Settings as paranoid_settings
#... |
# -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ---------------------------------------------------... |
import torch.nn as nn
import torch.utils.checkpoint as cp
from mmcv.cnn import constant_init, kaiming_init
from torch.nn.modules.batchnorm import _BatchNorm
from torch.nn.modules.utils import _triple
from ...utils import get_root_logger, load_checkpoint
from ..builder import BACKBONES
from ..common import build_norm_l... |
import tkinter as tk
from tkinter import *
from tkinter import messagebox
from tkinter import ttk
from tkinter import scrolledtext as st
from requestHandler import Request
import json
import json2table
from collections import OrderedDict
import pyperclip as pc
import os
import os.path
from os import path
from html5prin... |
# scrolling.py
import tkinter as tk
from widgets import (Canvas, FrameHilited3, Entry, ToplevelHilited, Text,
LabelHilited, ButtonFlatHilited, LabelTip2, CanvasHilited, Framex, Frame)
from styles import config_generic, make_formats_dict
import dev_tools as dt
from dev_tools import looky, seeline
'''
... |
from __future__ import division
import torch
import model_caller
import numpy as np
import h5py
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from mpl_toolkits.mplot3d import Axes3D
import viz
import time
import os
import copy
import data_utils
def fkl( angles, parent, off... |
'''
OnionPerf
Authored by <NAME>, 2015
See LICENSE for licensing information
'''
import os, traceback, subprocess, threading, queue, logging, time, datetime, re, shlex
from lxml import etree
# stem imports
from stem.util import str_tools
from stem.control import Controller
from stem.version import Version, Requ... |
from __future__ import absolute_import, division, print_function
import copy
import math
import logging
import libtbx
from dxtbx.model.experiment_list import Experiment, ExperimentList
from dials.array_family import flex
from dials.algorithms.indexing.indexer import Indexer
from dials.algorithms.indexing.known_orient... |
#!/usr/bin/python3
# License: https://raw.githubusercontent.com/Bleuzen/SpotRec/master/LICENSE
import dbus
from dbus.exceptions import DBusException
import dbus.mainloop.glib
from gi.repository import GLib
from pathlib import Path
from threading import Thread
import subprocess
import time
import sys
import shutil
im... |
from __future__ import absolute_import
from __future__ import division
from collections import namedtuple
import sys
import time
"""
Computes the difference between two texts. Originally based on
Diff Match and Patch
Copyright 2018 The diff-match-patch Authors.
original author <EMAIL> (<NAME>)
https://github.com/... |
# Copyright 2020 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD.
# See https://nomad-lab.eu for further info.
#
# 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/lic... |
import sys, copy, matplotlib.pyplot as plt, json, pickle, numpy as np, random
sys.path.insert(0, '..')
from Louis.misc import *
from Louis.ARC_data.objects import *
import pathlib, pickle, json, vose
cohesion_types_corresp = {
1: 'contact',
2: 'contact by point',
3: 'contact and color',
4: 'contact by... |
# -*- coding: utf-8 -*-
#
# Copyright © 2010 <NAME>
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
"""Shortcut management"""
# Standard library imports
from __future__ import print_function
import os
import re
import sys
# Third party imports
from qtpy.compat i... |
"""Simulator for Nordhaus' 2007 DICE model."""
from contextlib import contextmanager
import copy
import dataclasses
import os
import sys
import numpy as np
import pyomo
from pyomo.environ import (
RangeSet,
ConcreteModel,
NonNegativeReals,
Reals,
Var,
Constraint,
Objective,
summation,
... |
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import pickle
import os
import math
import sys
import time
import shutil
import torch
import data
from vocab import Vocabulary # NOQA
print ('vocab imported')
from model import VSE
from evaluation import i2t, t2i, i2t_article,t2... |
'''
Python script to calculate statistic functions
like the autocorrelation function (ACF), the second-order structure function (SF)
and so on.
Developed by <NAME>.
7/23/2021
8/19/2021
'''
# modules
import numpy as np
from scipy.fft import fft, ifft, fftn, ifftn, fftfreq, fftshift, ifftshift
from scipy.fft import ... |
# PyiiASMH (ppctools.py)
# Copyright (c) 2011, 2012, <NAME>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# no... |
from __future__ import unicode_literals
from functools import update_wrapper, partial
from guardian.shortcuts import assign_perm
from django.contrib.admin import SimpleListFilter
from django.contrib.admin.util import unquote, quote
from django.contrib.auth.models import Group
from django.core.urlresolvers import rever... |
#Topology Substation 7-8-17
#!/usr/bin/python
from mininet.net import Mininet
from mininet.node import Node, Controller, RemoteController, OVSSwitch, OVSKernelSwitch, Host
from mininet.cli import CLI
from mininet.link import Intf, TCLink
from mininet.log import setLogLevel, info
from mininet.node import Node, ... |
#!/usr/bin/env python
# =============================================================================
# Copyright (c) 2018 <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 res... |
from collections import OrderedDict, defaultdict
from enum import Enum
from pathlib import Path
from typing import Dict, List, Optional, Union
from .errors import DuplicateError
from .mixins import HookMixin, MetadataMixin, ProfileMixin
from .site_catalog import OS, Arch
from .writable import Writable, _filter_out_non... |
from datetime import datetime
import pytest
from httpolice.known import cc, media, tc, unit
import httpolice.parse
from httpolice.parse import (ParseError, empty, literal, many, named,
recursive, skip, string, subst)
from httpolice.structure import (ContentRange, ExtValue, LanguageTag,
... |
import os
import six
import json
import string
import collections
import torch.nn.functional as F
import numpy as np
import torch
import math
from data_utils.task_def import EncoderModelType
from pytorch_pretrained_bert.tokenization import BertTokenizer
LARGE_NEG_NUM = -1.0e5
tokenizer = None
def remove_punc(text):
... |
################################################################################
# Module: archetypal.template
# Description:
# License: MIT, see full license in LICENSE.txt
# Web: https://github.com/samuelduchesne/archetypal
################################################################################
import colle... |
import gc
import os
import re
import pytest
import random
from decimal import Decimal
from datetime import datetime, date, time, timedelta
from faker import Faker
faker = Faker()
if "DATABASE_URL" not in os.environ:
os.environ[
"DATABASE_URL"
] = "postgres://postgres:postgres@127.0.0.1:5432/test_atom... |
from pathlib import Path
from collections import defaultdict
from typing import NamedTuple
import pickle
import argparse
import warnings
from functools import reduce
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import cvxpy as cp
import numpy as np
from tqdm import tqdm
from joblib import P... |
import logging
import os
import pandas
from datetime import datetime
from enstools.misc import download, bytes2human, concat
from urllib.error import HTTPError
from urllib.request import urlopen
from enstools.core import get_cache_dir
class DWDContent:
# create a new temporal directory to store content.log and op... |
"""
See https://github.com/zsimic/pickley
"""
import logging
import os
import sys
import time
import click
import runez
from runez.render import PrettyTable
from pickley import __version__, abort, CFG, DOT_META, inform, PackageSpec, specced, TrackedSettings, validate_pypi_name
from pickley.delivery import DeliveryMe... |
import os
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.ticker import LogLocator
import numpy as np
import healpy as hp
import colorcet as cc
def plot_flux_fractions(params, true_ffs, preds, nptfit_ffs=None, out_file="ff_error_plot.pdf", legend=None,
show_stripes=Tru... |
import numpy as np
from pathlib import Path
import matplotlib as mpl
from matplotlib import pyplot as plt
import mpl_toolkits.mplot3d.axes3d as p3
from matplotlib.colors import ListedColormap
from matplotlib.colors import Normalize as norm
from basic_units import radians
from mpl_toolkits.axes_grid1.inset_locator imp... |
import discord
import asyncio
import uuid
import ast
from redbot.core import Config
from redbot.core import commands
from redbot.core import checks
from redbot.core.utils.predicates import ReactionPredicate
from redbot.core.utils.menus import start_adding_reactions, menu, DEFAULT_CONTROLS
k_factor = 40
defaults = {"... |
from . import assert_match, ntorch
import torch
from collections import OrderedDict
import pytest
import torch.nn.functional as F
from hypothesis import given
from .strategies import (
named_tensor,
broadcast_named_tensor,
mask_named_tensor,
dim,
dims,
name,
names,
)
from hypothesis.strategi... |
from __future__ import division, print_function
from functools import partial
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import csv
import h5py
from datetime import datetime, timedelta
import logging
from numpy.random import rand
from time import time
from os.path import exists, join
import... |
from dreamcoder.task import *
from dreamcoder.program import *
from dreamcoder.dreamcoder import *
from dreamcoder.utilities import *
import pickle, os
import joblib
from collections import namedtuple
from dreamcoder.utilities import numberOfCPUs
import torch.nn as nn
import torch.nn.functional as F
from dreamcoder.re... |
from sales.models import Bill, Bank, DebitPayment
from assets.models import Meter, ElectricTransformer
from users.models import User
from rest_framework import viewsets, permissions
from rest_framework.authentication import TokenAuthentication
from rest_framework.response import Response
from .serializers import BillSe... |
"""``cubi-tk isa-tab add-ped``: add records to ISA-tab from PED file."""
import argparse
import pathlib
import itertools
import io
import typing
from altamisa.isatab import (
InvestigationWriter,
AssayWriter,
StudyWriter,
Study,
Assay,
Arc,
Material,
Process,
Characteristics,
F... |
import pandas as pd
from Bio.PDB import Selection, PDBParser, Superimposer
# from Bio.PDB.vectors import rotmat, Vector
import numpy as np
import h5py
from tqdm import tqdm
import os
import multiprocessing as mp
"""
PDB file --> beads center DataFrame --> local structure --> rotated local structure
Functions in this... |
import gc
import os, sys
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
from tensorflow.keras.models import Model
import tensorflow.keras.layers as kl
import tensorflow.keras.models as km
import tensorflow.keras.callbacks as kc
import tensorflow.keras.backend as kb
import tensorflow.keras.r... |
""" Plotting of conformation distributions. """
import copy
import itertools
import math
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
from scipy.stats import entropy, gaussian_kde
from scipy.spatial import distance_matrix
from typing import Dict, List, Union
from ty... |
from utils import World, Rectangle
import numpy as np
import matplotlib.pyplot as plt
import random
"""
OccGrids_1 = []
for i in range(19520):
if i%1000 == 0:
print(i)
OccGrids_1.append(np.loadtxt("OccGrids_1/OccGrids_1_"+str(i)+".txt"))
OccGrids_1 = np.array(OccGrids_1)
OccGrids_1 = OccGri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.