text stringlengths 6.04k 39.5k |
|---|
"""Generalized, Automatic Data Dictionary Generator
author: <NAME>
email: <EMAIL>
This module will use some raw (00 level) data files from a datastream, modify them, ingest them,
and compare them to the original to find out which variables are in which columns and automatically
generate a json style data dictionary.
... |
"""HTTP :mimetype:`multipart/*`-encoded file streaming.
"""
import abc
import collections.abc
import io
import os
import stat
import typing as ty
import urllib.parse
import uuid
from . import filescanner
from . import utils
if ty.TYPE_CHECKING: #COMPAT: Py3.7-
import typing_extensions as ty_ext
else:
from . impo... |
# Copyright 2021 Huawei Technologies Co., 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... |
#!/usr/bin/env python
import sys
import os
import uuid
import subprocess
import shutil
import itertools
import argparse
from Bio import SeqIO
from Bio.SeqIO.FastaIO import SimpleFastaParser
import funannotate.library as lib
# setup menu with argparse
class MyFormatter(argparse.ArgumentDefaultsHelpFormatter):
de... |
'''
Implements the Domain Specific Pipeline (DSP)
Runs an MCTS modified to implement Eterna player strategies
Second process of the SAP
'''
import sys
import numpy as np
from eterna_score import get_pairmap_from_secstruct
import RNA
from subprocess import Popen, PIPE, STDOUT
import re
from difflib import SequenceMatch... |
# coding=utf-8
# Copyright 2020 The TensorFlow GAN Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
# Copyright 2017 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... |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... |
import decimal
import pandas as pd
import datetime
import re
def round_decimal(x, digits=0):
"""This function returns the round up float.
Parameters
----------
x : a float
digits : decimal point
Returns
----------
Rounded up float
"""
x = decimal.Decimal(s... |
#!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 ... |
import json
import logging
import re
import urllib
from dataclasses import dataclass, field
from typing import Any, Dict, Generator, Iterable, List
import click
import requests
from datahub.configuration import ConfigModel
from datahub.configuration.common import AllowDenyPattern
from datahub.ingestion.api.common imp... |
from __future__ import (absolute_import, division, print_function)
import numpy as np
import wrapt
from .util import iter_left_indexes, to_np
from .config import xarray_enabled
from .constants import default_fill
if xarray_enabled():
from xarray import DataArray
def uvmet_left_iter(alg_dtype=np.float64):
... |
"""
Streamline plotting for 2D vector fields.
"""
import numpy as np
import matplotlib
import matplotlib.cm as cm
import matplotlib.colors as mcolors
import matplotlib.collections as mcollections
import matplotlib.patches as patches
__all__ = ['streamplot']
def streamplot(axes, x, y, u, v, density=1, linewidth=No... |
# -*- encoding: utf-8 -*-
import copy
from expressions import inspect_variables
from .base import ModelObject
from .. import compat
from ..errors import ModelError, ArgumentError, ExpressionError
from ..common import get_localizable_attributes
__all__ = [
"AttributeBase",
"Attribute",
"Measure",
"... |
# Django settings for lnldb project.
from __future__ import print_function
import os
import re
import sys
import environ
try:
from django.urls import reverse, NoReverseMatch
except ImportError:
from django.core.urlresolvers import reverse, NoReverseMatch
def here(*x):
return os.path.abspath(os.path.joi... |
import math
import json
import random
import time
import calendar
import pickle
import os
import requests
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from collections import namedtuple
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
SEED = 270... |
#!/usr/bin/env python
"""
Isosurface rendering results in black image and warning
OSPRAY STATUS: ospray::Isosurfaces deprecated parameter use. Isosurfaces will begin taking an OSPVolume directly, with appearance set through the GeometricModel instead.
OSPRAY STATUS: ospray::Isosurfaces created: #primitives=1
Even th... |
"""Generates new queries on the JOB-light schema.
For each JOB-light join template, repeat #queries per template:
- sample a tuple from this inner join result via factorized_sampler
- sample #filters, and columns to put these filters on
- query literals: use this tuple's values
- sample ops: {>=, <=, =} fo... |
"""Methods for working with data and numpy arrays"""
import warnings
import numpy as np
def arr_sample(arr, rate):
"""Return an array linearly sampled from the input array at the given rate.
Examples
--------
* [1, 2, 3, 4] and rate 2 -> [1, 3]
* [1, 2, 3, 4] and rate 0.5 -> [1, 1, 2, 2, 3, 3,... |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
### ### ### ### ##... |
import numpy as np
import types
from copy import deepcopy
from sklearn.gaussian_process import GaussianProcessClassifier
from sklearn.gaussian_process.kernels import RBF
class Dataset(object):
def __init__(self, n_candidate, n_safety, n_test, seed=None, meta_information={}, **contents):
# Record dataset split size... |
import os
#import dill
import numpy as np
import pandas as pd
from Bio import SeqIO, Seq
import scipy.stats as st
import deepak.globals
import deepak.utilities
from deepak.library import MutationLibrary
from deepak.plot import replace_wt, all_correlations, make_heatmaps, make_fig_dir
pad = 948
target_T3 = ":917*ag"
... |
#!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... |
#!/usr/bin/env python3
import sys
import re
import logging
from copy import copy
from collections import Counter
from argparse import ArgumentParser
from logger import logger
# Regular expressions for parsing Freki format
# (see https://github.com/xigt/freki/blob/master/doc/Format.md).
BLOCK_PREAMBLE_RE = re.compi... |
from ...enums import Enum, IntEnum
__all__ = (
"GCGoodbyeReason",
"TradeResponse",
"Mercenary",
"ItemSlot",
"WearLevel",
"BackpackSortType",
"ItemFlags",
"ItemQuality",
"Language",
)
# fmt: off
class GCGoodbyeReason(IntEnum):
GCGoingDown = 1
NoSession = 2
class TradeRe... |
# -*- coding:utf-8 -*-
import json
from datetime import datetime, timedelta
from flask import Blueprint, request
from flask_restful import Resource
from atp.api.comm_log import logger
from atp.api.mysql_manager import (ApiCompanyInfoManager, ApiSystemInfoManager, ApiProductLineManager,
... |
#part of the code from openai
#https://github.com/openai/baselines/blob/master/baselines/deepq/replay_buffer.py
import numpy as np
import random
import operator
from numba import njit
class SegmentTree(object):
def __init__(self, capacity, operation, neutral_element):
"""Build a Segment Tree dat... |
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 4 11:06:02 2020
@author: MA
"""
import tensorflow as tf
import numpy as np
from config import cfg
import keras as k
from keras.utils import conv_utils
from keras.layers import Input, InputSpec
from keras import backend as K
epsilon = 1e-9
class ConvertToCaps(object):
... |
import logging
import os
import re
import requests
import inspect
from collections import OrderedDict
from operator import itemgetter
from urllib import parse
from django.conf import settings
from django.http import Http404
from data import constants, utils
MAX_FINANCIALS_COUNT = 4
logging.basicConfig(level=loggin... |
from . import _dbg
from . import about
from . import ev
from . import gs
from collections import namedtuple
import os
import re
import string
import sublime
import subprocess
import time
st_environ = os.environ.copy()
try:
STARTUPINFO = subprocess.STARTUPINFO()
STARTUPINFO.dwFlags |= subprocess.STARTF_USESHOWWINDOW... |
import sys
import os
import unittest
import shutil
from io import StringIO
sys.path.append(".")
from mock_gff3 import Create_generator
import annogesiclib.merge_manual as mm
class TestGensRNAOutput(unittest.TestCase):
def setUp(self):
self.example = Example()
self.test_folder = "test_folder"
... |
#!/usr/bin/env python3
# Program to dump out spex mekal model at various temperature grid points
# The lines and continuum are then gathered up, and stored in an apec-format
# table model for xspec
# <NAME> 2005-2022
# Version 2.0 (2018-07-31): Support SPEX 3.04
# Version 2.1 (2020-07-12): Pseudo-continuum implement... |
# pylint: disable=no-member
# pylint: disable=unsubscriptable-object
"""
Defines :class:`.BcrClinicalXmlToJsonParser`, a class (that is instantiated
with a given project_code) which consumes BCR Clinical XML and produces JSON.
Pylint ``no-member`` error is disabled because for some reason there are a lot
of false posi... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import itertools
import time
from contextlib import ExitStack as contextlib_ExitStack
from typing import Any, Iterable, List, Optional, Tuple
import torch
from pytext.common.constants import BatchContext, Stage
from pytext.c... |
from pypylon import pylon
from GhostScan.Camera import Camera
from abc import ABC
import numpy as np
import cv2
import os, time, math
from skimage import io
from io import BytesIO
from IPython.display import clear_output, Image, display, update_display
import PIL
from GhostScan.Cameras.liveDisplay import ptgCamStream, ... |
"""Provide consistent and up-to-date ``__version__`` strings for Python
packages.
It is easy to forget to update ``__version__`` strings when releasing
a project, and it is important that the ``__version__`` strings are
useful over the course of development even between releases,
especially if releases are infrequent.... |
# dicom operations
import os
import os.path as op
import logging
from collections import OrderedDict
import tarfile
from heudiconv.external.pydicom import dcm
from .utils import SeqInfo, load_json, set_readonly
lgr = logging.getLogger(__name__)
def group_dicoms_into_seqinfos(files, file_filter, dcmfilter, grouping)... |
"""
DESCRIPTION
Preprocesses audio data before sending to Neural Network
See demo in in main()
MIT License
Copyright (c) 2018 The-Instrumental-Specialists
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 t... |
import datetime
import hashlib
import os
import re
import tempfile
from email.header import decode_header
from email.iterators import typed_subpart_iterator
from email import message_from_string
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.exceptions import ObjectDoes... |
import img_cap_text as t
import numpy as np
from numpy import array
import pandas as pd
import matplotlib.pyplot as plt
import string
import os
from PIL import Image
import glob
#from pickle import dump, load
import pickle
from time import time
from keras.preprocessing import sequence
from keras.models imp... |
# (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# std
from collections import defaultdict
from functools import wraps
# 3rd party
from pysnmp.entity.rfc3413.oneliner import cmdgen
import pysnmp.proto.rfc1902 as snmp_type
from pysnmp.smi import builder
from pys... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Copyright 2019, <NAME>, HKUST.
Training script.
"""
from __future__ import print_function
import os
import time
import sys
import math
import argparse
from random import randint
import cv2
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
s... |
from django.utils.translation import ugettext as _
import uuid
from dateutil.parser import parser
import simplejson
from casexml.apps.case.models import CommCareCase
from corehq.apps.users.models import CommCareUser
from couchforms.models import XFormInstance
from dimagi.utils.decorators.memoized import memoized
from p... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 7 13:24:29 2017
@author: ejreidelbach
"""
#------------------------------------------------------------------------------
# Obtain Rankings and Standings Information from the ESPN website
# ---------------------------------------------------------... |
# -*- coding: utf-8 -*-
from enum import Enum
from lark.lexer import Token
from storyscript.compiler.lowering.Faketree import FakeTree
from storyscript.compiler.lowering.utils import service_to_mutation, \
unicode_escape
from storyscript.parser.Transformer import Transformer
from storyscript.parser.Tree impor... |
import demistomock as demisto
from CommonServerPython import *
from ReversingLabs.SDK.a1000 import A1000
VERSION = "v2.0.0"
USER_AGENT = f"ReversingLabs XSOAR A1000 {VERSION}"
HOST = demisto.getParam('host')
TOKEN = demisto.getParam('token')
VERIFY_CERT = demisto.getParam('verify')
RELIABILITY = demisto.params().get('... |
# from matplotlib import pyplot as plt
import json
import os
import shutil
import cv2
import numpy as np
import tvm
from absl.flags import FLAGS
from tensorflow.python.saved_model import tag_constants
from tvm.contrib import graph_runtime
import tensorflow as tf
from absl import app, flags
from absl.flags import FLAGS... |
"""Carry out off-policy analysis using previously generated obs. data."""
import argparse
import pickle
import os
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from sklearn.linear_model import LogisticRegression
# config
THRESHOLDS = np.arange(300, 850, 5)
AXISFONTSIZE =... |
from PyQt5.QtWidgets import *
from PyQt5.QtCore import Qt
from PyQt5 import QtCore,QtGui,QtWidgets
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
import cv2
import os
import sys
import json
import datetime
import numpy as np
import matplotlib.pyplot as plt
import skimage
from mrcnn imp... |
#!/usr/bin/env python
import numpy as np
import scipy.linalg as splin
import time
import sys
# add logger, to allow logging to Labber's instrument log
import logging
log = logging.getLogger('LabberDriver')
MAC = (sys.platform == 'darwin')
if MAC:
pass
# import pyximport
# pyximport.install(s... |
#%%
import os
import xml
import heapq
import warnings
import numpy as np
import pandas as pd
from tqdm import tqdm
from shapely import wkt
import geopandas as gpd
from xml.dom import minidom
from collections import deque
import matplotlib.pyplot as plt
from haversine import haversine, Unit
from shapely.geometry import ... |
from __future__ import division, print_function
import numpy
from numpy.fft import fft2, ifft2
from numpy import log
import scipy.ndimage.interpolation as ndii
import scipy.ndimage.filters as scifil
#__version__ = '2013.01.18'
#__docformat__ = 'restructuredtext en'
#__all__ = ['translationSimple', 'similarity']
im... |
import logging
import ipdb
import IPython
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
SOS_ID = 0
EOS_ID = 0
class Attention(nn.Module):
def __init__(self, input_dim, source_dim=None, output_dim=None, bias=False):
super(Attention, self).__init__()
... |
# -*- coding: utf-8 -*-
import sys, traceback, os
import multiwordnet.db as db
from multiwordnet.wordnet import WordNet
import Levenshtein
libdir = "/usr/local/lib/python3.6/site-packages/multiwordnet/db/"
eng_numbers = ("one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten")
lat_numbers = ("... |
from abc import ABC, abstractmethod
from typing import Union, List, Tuple
import tensorflow as tf
import pandas as pd
from util.data_loader import *
from sklearn.metrics import mean_squared_error
class PINN(ABC):
def __init__(self,
act_fun: str = "tanh",
n_nodes: int = 20,
... |
import numpy as np
import matplotlib.pyplot as plt
from Projects.Project2.ConvLayer2D import ConvLayer2D
from Projects.Project2.DenseLayer import DenseLayer
from Projects.Project2.FullyConnectedLayer import FullyConnectedLayer
from Projects.Project2.DataGeneration2 import DataGeneration2
class ConvolutionalNetwork:
... |
from dataclasses import dataclass, field
from typing import List, Mapping, Optional, Tuple
from rogue_net.input_norm import InputNorm
import torch.nn as nn
import torch
from ragged_buffer import RaggedBufferI64
import math
from entity_gym.environment import ObsSpace
@dataclass(frozen=True, eq=False)
class RelposEnco... |
import json
from jsonargparse import ArgumentParser, ActionConfigFile
import yaml
from typing import List, Dict
import glob
import os
import pathlib
import pdb
import subprocess
import copy
from io import StringIO
from collections import defaultdict
import torch
from spacy.tokenizer import Tokenizer
from spacy.... |
# import numpy as np
# import pydensecrf.densecrf as dcrf
#
# d = dcrf.DenseCRF2D(640, 480, 5) # width, height, nlabels
# for i in range(3):
# print(i)
import torch
from torch import nn
import torch.nn.functional as F
import numpy as np
from torch.autograd import Variable
class UNet(nn.Module):
def __init__(self, ... |
#!/usr/bin/env python3
"""
* xml_dataset_generator_gm9.py
*
* Copyright (c) 2022, DarkMatterCore <<EMAIL>>.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear i... |
#! /usr/bin/env python3
# coding: utf-8
from __future__ import annotations
from collections.abc import Iterator
import math
from operator import itemgetter
import typing as t
from dropbox import Dropbox
import gpxpy
import pendulum
from psycopg2.extensions import connection
import slack
from gargbot_3000 import comm... |
from functools import reduce
from itertools import product, chain, zip_longest, compress, filterfalse
from math import radians, atan2, degrees, floor, ceil, hypot, pi, sin
from typing import List, Iterator, Set, Tuple
from uuid import uuid4
from engine.models.observable import Observable
from engine.physics.line impor... |
"""Alconna 的基础内容相关"""
import re
import inspect
from copy import copy
from enum import Enum
from contextlib import suppress
from dataclasses import dataclass, field
from typing import Union, Tuple, Dict, Iterable, Callable, Any, Optional, Sequence, List, Literal, TypedDict, Set
from .exceptions import InvalidParam, Nu... |
# Copyright 2016 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... |
# Copyright 2020 The SQLFlow 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 applicable law o... |
"""
${NAME}
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
from PySide import QtCore, QtGui
from mcedit2.util.resources import resourcePath
from mceditlib import nbt
log = logging.getLogger(__name__)
_nbtIcons = {}
_iconTypes = [
"",
"byte.... |
import cv2
import numpy as np
import glob
from sklearn.cluster import KMeans
import tqdm
import random
import math
import re
color_list = {
"red1": (0, 0, 255),
"red2": (71, 99, 255),
"red3": (0, 0, 139),
"red4": (143, 143, 188),
"red5": (53, 47, 90),
"red6": (39, 54, 249),
"red7": (24, 20,... |
from __future__ import print_function
from __future__ import division
from itertools import combinations
import numpy as np
import torch
from sklearn import metrics
from sklearn.cluster import KMeans
from scipy.spatial.distance import squareform, pdist, cdist
#import faiss
from tqdm import tqdm
import evaluation
i... |
# fpy.py: wrapper functions for the sim_data library to make accessing
# simulation output more pythonic.
#
#
# coded by <NAME> on 18 January 2019
# Edited by <NAME> on the 14th of August 2019
# Mesh added by <NAME> on 20 August 2019
# <EMAIL>
# <EMAIL>
# <EMAIL>
import fio_py
import numpy as np
import h5py
class sim... |
#!/usr/bin/env python
import sys
import time
import os.path
from copy import deepcopy
import random
ROOMT = 298.15
PH2KCAL = 1.364
class Env:
def __init__(self):
# Hard define values
self.runprm = "run.prm"
self.version = "PyMCCE 0.1"
self.fn_conflist1 = "head1.lst"
self.fn... |
#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import bz2
import gzip
import json
import logging
import logging.handlers
import os
import re
import shutil
import subprocess
import sy... |
import time
import random
import itertools
# import gc
import os
import sys
import glob
import datetime
import numpy as np
import yaml
import pickle
from operator import itemgetter
from optparse import OptionParser
from sklearn.model_selection import KFold
from sklearn.metrics import roc_curve, auc, average_precision... |
import os
import shutil
import pickle
import multiprocessing
import math
from collections import Counter, defaultdict
from tqdm import tqdm
from ..conceptualize.aser_conceptualizer import SeedRuleASERConceptualizer, ProbaseASERConceptualizer
from ..conceptualize.utils import conceptualize_eventualities, build_c... |
#!/usr/local/bin/python3
import json
import mne
import warnings
import numpy as np
import os
import pandas as pd
from brainlife_apps_helper import helper
def apply_maxwell_filter(raw, calibration_file, cross_talk_file, head_pos_file, destination, param_st_duration,
param_st_correlation, para... |
# pkill -f python
import csv
from enzyme import enzyme, csv_enzyme, biopy_enzyme
from entry import entry
from digested_sequence import digested_sequence
from restriction_map import restriction_map
import pandas as pd
import re
from Bio.Restriction import *
from Bio.Seq import Seq
from Bio.Alphabet.IUPAC import IUPAC... |
import datetime
from enum import Enum
import requests
from bs4 import BeautifulSoup
from django.conf import settings
from django.shortcuts import get_object_or_404
from django.utils import timezone
from django.utils.timezone import make_aware
from requests.exceptions import ConnectionError, ConnectTimeout, ReadTimeout... |
"""
This module contains functionality required for disconnected installation.
"""
import glob
import logging
import os
import tempfile
import yaml
from ocs_ci.framework import config
from ocs_ci.helpers.disconnected import get_oc_mirror_tool, get_opm_tool
from ocs_ci.ocs import constants
from ocs_ci.ocs.exceptions ... |
import cv2
import pyodbc
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt,QObject, QThread, pyqtSignal
from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt, QThread)
from design import Ui_Form
from cam_ui import Ui_MainWindow
import queue
import ... |
# 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.
#
# ## ### ##... |
"""
@Time : 2021/7/8 10:04
@Author : <NAME>
@E-mail : <EMAIL>
@Project : TCSVT2021_DCENet
@File : DCENet.py
@Function: DCENet
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import backbone.resnet.resnet as resnet
###############################################################... |
# -*- coding: utf-8 -*-
from __future__ import division, absolute_import
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm as CM
import seaborn as sb
import plotly.graph_objs as go
sb.set()
def get_year(dt):
return dt.year
def get_doy(dt):
return dt.dayofyear
... |
from __future__ import unicode_literals
from django.db import models
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from project.models import Project, ProjectRelease, SourceElement
DOCUMENT_SOURCE = 'd'
CHANNEL_SOURCE = 's'
LANGUAGES = [
('j', 'Java'... |
#!/usr/bin/env python2
import uuid
import os.path
import bz2
import glob
import logging
import datetime
import json
import re
import itertools
# import peewee
from peewee import *
from playhouse.db_url import connect as db_url_connect
from tqdm import tqdm
# logging.basicConfig(level=logging.DEBUG)
logger = logging.... |
# This file is part of Radicale Server - Calendar Server
# Copyright © 2008 <NAME>
# Copyright © 2008 <NAME>
# Copyright © 2008-2017 <NAME>
# Copyright © 2017-2018 Unrud <<EMAIL>>
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published... |
# pyre-strict
import logging
import os
import tempfile
import json
import copy
import traceback
from datetime import datetime
from abc import ABC, abstractmethod
from typing import Tuple, List, Dict, Optional
from requests.exceptions import ReadTimeout
import docker
import WDL
class CommandError(WDL.Error.RuntimeErro... |
##################### Wisconsin Breast Cancer Project ########################
###################### By <NAME> ###########################
import pandas as pd
import numpy as np
import math
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
#Function to calculate the euclid... |
from abc import abstractmethod
import tensorflow as tf
import numpy as np
import time
from models.layers import conv2d, lrn, max_pool2d, flatten, fully_connected, global_avg_pool, batch_norm
class ConvNet(object):
def __init__(self, input_shape, num_classes, **kwargs):
self.X = tf.placeholder(shape=[None... |
"""Interface with the RAK811 module.
Copyright 2021 <NAME>
Based on the work of <NAME>
See https://github.com/AmedeeBulle/pyrak811/tree/master/rak811
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 Licens... |
"""
A resource API for WAF and WAF-regional
"""
from enum import Enum, auto
from typing import Iterable, Dict, Container, Union, Generator, Optional, List
import boto3
from .basic import scroll
import abc
import logging
import json
import collections
from .cleaning import clean_up_stack
logger = logging.getLogger(__n... |
# __author__ = '<NAME>, <NAME>' # Modified by <NAME>
import argparse
import time
import math
import numpy as np
import os
import torch
import torch.nn as nn
from torch.autograd import Variable
import pickle as pkl
from models_sgd_walk import ResNet56, vgg11, MLPNet # the files from sgd_walk; quite restricted, need to ... |
'''
--- Day 4: Passport Processing ---
You arrive at the airport only to realize that you grabbed your North Pole Credentials instead of your passport. While these documents are extremely similar, North Pole Credentials aren't issued by a country and therefore aren't actually valid documentation for travel in most ... |
#
# Copyright 2016-2017 Games Creators Club
#
# MIT License
#
import gccui
import pyros
import pyros.gcc
import pyros.gccui
import pyros.agent
import pyros.pygamehelper
import pygame
import sys
import time
from pygame import Rect
from PIL import Image
from rover import Rover
from client_utils import TelemetryUtil, R... |
import numpy as np
import tensorflow as tf
import time
import pickle
import pdb
import os
from conf import params
class BaseModel():
""" Base model containing generic methods for running the tests """
def __init__(self, var_names, var_inits, model_name, d):
"""
Initialize model from variable... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from ...ops.votr_ops import votr_utils
def scatter_nd(indices, updates, shape):
"""pytorch edition of tensorflow scatter_nd.
this function don't contain except handle code. so use this carefully
when indice repeats, don't support repeat ad... |
# encoding: utf-8
import logging
import re
from io import BytesIO
from zipfile import ZipFile
from collections import OrderedDict
import pandas as pd
from urllib.request import urlopen
import os.path
from .helpers import pitch_count, progress, game_state
from .version import __version__
from .event import event
cl... |
from __future__ import absolute_import
# minimum number of nodes (per role) we can have after a removal
_MIN_ETCD_MEMBERS_AFTER_REMOVAL = 1
_MIN_MASTERS_AFTER_REMOVAL = 1
_MIN_MINIONS_AFTER_REMOVAL = 1
# an exported (to the mine) grain used for getting ids
DEFAULT_GRAIN = 'nodename'
# all the "*_in_progress" grains... |
from __future__ import print_function
import argparse
import os
import cv2
import time
import mxnet as mx
import numpy as np
from rcnn.config import config
from rcnn.symbol import get_vggm_test, get_vggm_rpn_test
from rcnn.symbol import get_vgg_test, get_vgg_rpn_test
from rcnn.symbol import get_resnet_test
from rcnn.io... |
import os
import re
import sys
import time
import select
import pkgutil
import logging
import warnings
import threading
import traceback
import subprocess
import six
import shutil
import pip as pip_mod
from datetime import datetime
from localstack import constants, config
# set up logger
LOG = logging.getLogger(os.pat... |
#!/usr/bin/env python3
import os
import shutil
import sys
import re
import requests
import pytz
import pause
from os import environ
from enum import Enum
from datetime import datetime, timedelta, timezone
from osmeterium.run_command import run_command
from MapColoniesJSONLogger.logger import generate_logger
DATA_FOLD... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Implementation of elliptic curves, for cryptographic applications.
#
# This module doesn't provide any way to choose a random elliptic
# curve, nor to verify that an elliptic curve was chosen randomly,
# because one can simply use NIST's standard curves.
#
# Notes from... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.