text stringlengths 8.04k 46.5k |
|---|
from __future__ import absolute_import, unicode_literals
import datetime
import phonenumbers
import pytz
import regex
from abc import ABCMeta, abstractmethod
from datetime import timedelta
from enum import Enum
from ordered_set import OrderedSet
from temba_expressions import conversions
from temba_expressions.dates i... |
from kosudoku.grid import SudokuWell, SudokuGenomicCoord
# ------------------------------------------------------------------------------------------------ #
def FindFeaturesWithDisruptionsInProgenitorButNotInQC(featureArray):
# Take an updated feature array and check it for features that have representative mutant... |
from __future__ import absolute_import
from __future__ import print_function
import sys
import abc
import copy
import logging
import re
from abc import abstractmethod
from collections import OrderedDict
from .dna_reshapers import ReshapeDnaString, ReshapeDna
from .mutators import OneHotSequenceMutator, DNAStringSequen... |
import os
import re
import sys
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.font_manager import FontProperties
from matplotlib.offsetbox import HPacker, TextArea, AnnotationBbox
from matplotlib.patches import FancyArrowPatch, ArrowStyle, Polygon
from matplot... |
import os
import time
import numpy as np
import pandas as pd
import torch
import torch.optim as optim
import umap
from matplotlib import pyplot as plt
from sklearn.manifold import TSNE
from data.data_loader import get_data_ts_onh_mac
from losses import elbo_general_timeseries
from losses import mae_globalmean, mae_l... |
# Others
import math
import time
import random
import pickle
import statistics
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from datetime import datetime
from collections import Counter
from scipy.spatial import distance
# Pytorch
from torch.utils.data import DataLoader
... |
import re
from enum import Enum
from collections import defaultdict
import bisect
import itertools
from .annotation import TextAnnotations, TextBoundAnnotationWithText, EventAnnotation, BinaryRelationAnnotation
from .standoffizer import Standoffizer
# _header_re = re.compile(r"^#(?P<name>FORMAT|Sentence.id|T_(?:SP|RL|... |
""" This module provides the functionality to calculate ephemeris for two bodies problem
also in the case of perturbed methods. More advance pertubed methods will be handled
in other module
"""
# Standard library imports
import logging
from math import isclose
from typing import ForwardRef
# Third party imports
imp... |
import numpy as np
from scipy.sparse import lil_matrix
import scipy.sparse.linalg as sp
import scipy.sparse as sparse
import math
import csv
import matplotlib.pyplot as plt
def linear_powerflow_model(Y00,Y01,Y10,Y11_inv,I_coeff,V1,slack_no):
# voltage linearlization
V1_conj = np.conj(V1[slack_no:])
V1_conj... |
"""Class to automatically select available and new primers for sequencing runs.
"""
from copy import deepcopy
import re
from collections import defaultdict
import pandas
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
import numpy as np
from Bio import SeqIO
import flametree
from... |
"""Utilities for configuration."""
from copy import copy, deepcopy
from collections import namedtuple
import dill
import inspect
import pickle
from vectorbt import _typing as tp
from vectorbt.utils import checks
from vectorbt.utils.docs import Documented, to_doc
class Default:
"""Class for wrapping default valu... |
try:
import OpenGL
try:
import OpenGL.GL # this fails in <=2020 versions of Python on OS X 11.x
except ImportError:
from ctypes import util
orig_util_find_library = util.find_library
def new_util_find_library( name ):
res = orig_util_find_library( name )
... |
import asyncio
import logging
import disnake
from disnake.ext import commands
from cogs.mixins import AceMixin
from utils.configtable import ConfigTable
from utils.context import can_prompt
from utils.converters import EmojiConverter, MaxLengthConverter
from utils.string import po, shorten
log = logging.getLogger(__... |
#!/usr/bin/env python
"""
Selenium Automation Script for entering information into AWS WAR (Well-Architected Review) Portal
Defaults:
Input configuration file path: <script_dir>/war_input.ini
Output directory path: <script_dir>/<customer_name_dir>/
Exit codes and their descr... |
#!/usr/bin/env python
'''
Program which acts as the collector for the Vendor Event Listener REST API.
Only intended for test purposes.
License
-------
===================================================================
Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
========================... |
import logging
import math
import pdb
from torch import nn
from torch.nn import functional as F
import torch
from texar.torch.modules.encoders import TransformerEncoder
from texar.torch.modules.embedders import EmbedderBase
from event import util
from event.arguments.implicit_arg_resources import ImplicitArgResources... |
"""
Implement optics algorithms for optical phase tomography using GPU
<NAME> <EMAIL>
<NAME> <EMAIL>
October 22, 2018
"""
import numpy as np
import arrayfire as af
import contexttimer
from opticaltomography import settings
from opticaltomography.opticsmodel import MultiTransmittance, MultiPhaseContrast
from op... |
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
import argparse
import hashlib
import logging
import os
import pathlib
import platform
import shutil
impo... |
#PyTrx (c) by <NAME>, <NAME>, <NAME>
#
#PyTrx is licensed under a MIT License.
#
#You should have received a copy of the license along with this
#work. If not, see <https://choosealicense.com/licenses/mit/>.
"""
The Area module handles the functionality for obtaining areal measurements from
oblique time-lapse imagery... |
#----------------------------------------------------------------------
# QuantumRaspberryTie.qiskit
# by KPRoche (<NAME>) (c) 2017,2018,2019,2020,2021
#
# Connect to the IBM Quantum Experience site via the QISKIT IBMQ functions
# run OPENQASM code on the simulator there
# Display the resu... |
"""Algorithms for generalized Streett and Rabin games.
References
==========
<NAME>, <NAME>, <NAME>,
<NAME>, <NAME>
"Synthesis of reactive(1) designs"
Journal of Computer and System Sciences
Vol.78, No.3, pp.911--938, 2012
<NAME>
"Debugging formal specifications with
simplified counterstrategies... |
#!/usr/bin/env python
from __future__ import division, absolute_import, print_function
import numpy as np
from scipy import interpolate, signal
def xkcd_line(x, y, xlim=None, ylim=None, mag=1.0, f1=30, f2=0.05, f3=15):
"""
Mimic a hand-drawn line from (x, y) data
Definition
----------
... |
from tuber import app, config
from flask import send_file, request, jsonify, escape
from tuber.models import *
from tuber.permissions import *
from tuber.database import db
from sqlalchemy import and_
from sqlalchemy.orm import joinedload
import os
from tuber.api import *
from .room_matcher import rematch_hotel_block
... |
import tensorflow as tf
import cv2
from tensorflow.keras.applications.imagenet_utils import preprocess_input
import numpy as np
from collections import namedtuple
from typing import List
import itertools
import collections
import tflite_runtime.interpreter as tflite
CLASSES = ['aeroplane', 'bicycle', 'bird', 'boat', 'b... |
# NOTE: DO NOT UPDATE THIS FILE - Create a new views_common.py and place any views there if you need it. then reference
# your new one in the urls.py file (which should be edited by you)
import os
import logging
import mimetypes
import importlib.util
import json
import codecs
from django.conf import settings
# fro... |
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by <NAME> (<EMAIL>)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __future__ import divis... |
# Song-to-playlist classifier utils.
from __future__ import print_function
from __future__ import division
from utils.evaluation import compute_metrics, summarize_metrics
from sklearn.utils import check_random_state, shuffle
from tqdm import tqdm
import theano.tensor as T
import theano
import lasagne as lg
import n... |
#! /usr/bin/python3
# -*- coding: utf-8 -*-
#--------------------------------------------------------------------------------------------------
# Dictionary searcher of union database
#
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
# except in co... |
# Copyright (c) 2019 Cisco and/or its affiliates.
# 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 ag... |
#Import necessary libraries
# return a secure version of the user input file name
from werkzeug.utils import secure_filename
# Flask - Flask is an API of Python that allows us to build up web-applications.
# flash - used to generate informative messages in the flask
# request - used to gain access
# redirect ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... |
#!/usr/bin/env python
#
# Copyright (c) 2001-2010,2011,2012 The SCons Foundation
#
# 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 righ... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# ---------------... |
# Copyright 2019 IBM Corp.
#
# 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... |
import numpy as np
import matplotlib.pylab as plt
import neuroglancer
from analysis_script.utils_format_convert import read_image_vol_from_h5
from ffn.inference.storage import subvolume_path
from neuroglancer_segment_visualize import neuroglancer_visualize
from run_consensus import run_save_consensus
import networkx
im... |
import os
import time
from lib.tools.other_tools import *
from lib.tools.logger import logger
from lib.report.report_tools import global_track_dt
from lib.parsing.gtf_object_tools import create_gtf_object, write_gtf
def identify_groups_with_uniform_consensus(gtf_obj):
# print(time.asctime(), "Identifying genomi... |
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib
#matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from matplotlib.colors import colorConverter
import os
import ast
from scipy import ndimage
import paras_dorsoventral as dors
import para... |
# -*- coding: utf-8 -*-
# Create your views here.
from django.http import HttpResponseRedirect
from django.shortcuts import redirect, render
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.shortcuts imp... |
# This file is part of the pyMOR project (http://www.pymor.org).
# Copyright 2013-2020 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
import numpy as np
from pymor.analyticalproblems.domaindescriptions import KNOWN_BOUNDARY_TYPES
f... |
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from app.base import constants
from app.base.routes import requires_auth, session
from app.home import blueprint
from flask import render_template, request, jsonify, redirect, url_for
from jinja2 import TemplateNotFound
from kafka import KafkaPr... |
import smtplib, ssl
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import os
import random
# from Core.Usermanagement import get_user_type_and_langage # ToDo: recursive import !!! Fix this Issue
from Core.dbconn import get_database_connection
footer = """
<footer styl... |
#
# Copyright 2014 Openstack Foundation.
#
# 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 l... |
# coding: utf-8
import numpy as np
import math
import functools
import json
import datetime
import uuid
import chainer
import chainer.functions as F
import chainer.links as L
from chainer import Variable, serializers
from chainer.backends import cuda
def choice_random(player):
_, _, putable_position_nums = player... |
'''
author: <NAME> || @slothfulwave612
Python module for i/o operations on the dataset.
'''
## import necessary packages/modules
import os
import numpy as np
import pandas as pd
from pandas.io.json import json_normalize
import json
import math
import multiprocessing
from tqdm.auto import tqdm, trange
import statsmode... |
import networkx as nx
import numpy as np
import os
from collections import namedtuple
from itertools import chain
from matplotlib import colors
from matplotlib import pyplot as plt
from numpy.random import rand, randint, shuffle
from scipy.spatial import Delaunay, Voronoi
from perlin_noise import PerlinNoise
VER... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Name: csv_print_html_oia.py
# Description:
#
# Author: m.akei
# Copyright: (c) 2021 by m.na.akei
# Time-stamp: <2021-04-25 16:33:53>
# Licence:
# ---------------------------------... |
from numpy import *
#import joelib.constants.constants as ctns
from joelib.constants.constants import cc, mp
from joelib.physics.grb_observables import *
from joelib.physics.afterglow_properties import *
from joelib.physics.afterglow_dynamics import *
from scipy.interpolate import interp1d
#from tqdm import tqdm
#from ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Example usage and tests for :mod:`orion.core.io.resolve_config`."""
import hashlib
import logging
import os
import shutil
import socket
import git
import pytest
import orion.core
import orion.core.io.resolve_config as resolve_config
@pytest.fixture
def force_is_exe(... |
#!/usr/bin/env python3
import os
import sys
import argparse
from datetime import datetime
from datetime import timedelta
import math
import subprocess
import time
from glob import glob
def get_station_id_lat_lon_alt(location_file, station):
lat = -9999
lon = -9999
alt = -9999
id = 'unknown'
inF... |
#!/usr/bin/env python3
""" greylost - DNS threat hunting. """
import os
import sys
import json
import copy
import argparse
import signal
import pickle
import atexit
import syslog
import statistics
from base64 import b64encode
from time import sleep, time
from datetime import datetime
import dnslib
from dmfrbloom.tim... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 17 22:40:02 2015
@author: tsz
"""
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
# Table B8.1 (Excel: Tables 1) - MWh
annualHeatingLoad = np.array([4.296, 4.773, 5.709, 5.226, 5.596, 4.882, 4.872, 5.362])
# Tabl... |
# Generated from ../cl/PolyLang.g by ANTLR 4.9.1
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
from typing import TextIO
else:
from typing.io import TextIO
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3b... |
import json
from urllib.request import Request, urlopen
from urllib.error import URLError
import logging
import os
from datetime import datetime
import sys
import importlib
importlib.reload(sys) # Reload does the trick!
from src.models import Source, Psimi, Dbentity, Go, Taxonomy, Eco, Referencedbentity, \
Locu... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
------------------------------------------... |
__all__ = ['FrameTopLevel', 'FrameMulti']
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import gridspec
import numpy as np
import os
from importlib import reload
from pdb import set_trace
from . import parameters
from .legend import Legend
# mpl.rcParams['text.usetex'] = True
def show_doc... |
"""
Extract and represent table schema, generate CREATE TABLE logic.
Does _not_currently handle auto_increment, as not all backends provide that data.
May simplify/muddle key names due to dialect weirdness, does not currently preserve coalation / charset / etc.
TODO:
- Coalation, charset
- Preserve auto_inc if availa... |
from collections import defaultdict
import glob
import os
import string
import subprocess
import sys
import tempfile
import textwrap
from docutils import frontend, languages, nodes, writers
from docutils.parsers.rst import directives
from roman import toRoman
import tinycss
CSS_FILE = os.path.join(os.path.dirname(__f... |
import re,time,os
import matplotlib.pyplot as plt, matplotlib.dates as md, numpy as np, pandas as pd, datetime as dt
import threading, queue, time, pickle
kuyruk = queue.Queue()
def ikinciyiAl(eleman):
return eleman[1]
def Resim_isle2(islem_zamani,uzay_ekseni,aktarilan_bit,dosyaAdi, kaynak, hedef, islenenAkis,si... |
#: all our lists are one-way
#: http://grokbase.com/t/python/mailman-users/0295zewgte/is-one-way-possible
import os
from urllib.error import HTTPError
from io import BytesIO
from flask import request, redirect, url_for, current_app
from flask_jsonschema import validate
from flask_gnupg import fetch_gpg_key, get_keyid
... |
#!/usr/bin/env python3
"""
File: isc_utils.py
Clause: all
Title: ISC Syntax Utilities
Description: Utility functions for pyparsing of ISC-style
configuration file
pe.setName() shall follow ISC Bind9 naming convention
Requires: pyparsing-2.4.3 (Char method)
"""
import os
import os.path
imp... |
#!/usr/bin/env python
# coding=utf-8
"""
Script to sample uncertain user parameters
"""
from __future__ import division
import random as rd
import numpy as np
from scipy.stats import nakagami
def main():
nb_samples = 100000
import matplotlib.pyplot as plt
# Get samples of set temperatures within build... |
# coding: utf8
import os
import copy
import pytest
import numpy as np
import numpy.testing as npt
from scipy.io import wavfile
import openturns as ot
from mock import patch
from batman.visualization import (HdrBoxplot, Kiviat3D, Tree, pdf,
sensitivity_indices, corr_cov, reshow,
... |
import sys
import logging
import json
from collections import OrderedDict
from pathlib import Path
import matplotlib as mpl
import matplotlib.patheffects as PathEffects
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import stats
from scipy.special import erf # noqa:E0611
import lmf... |
#!/usr/bin/env python3
# This work was not produced in affiliation with any of the device manufactures and is,
# and is intended to be, an independent, third-party research project.
#
# This work is presented for research and educational purposes only. Any use or reproduction
# of this work is at your sole risk. The w... |
"""
evaluates a trained Neural Network on its salient features regarding the time and feature dimension
creates a saliency heatmap
model should be trained beforehand
"""
import pandas
import pandas as pd
import torch
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import step
from statsmodels.... |
"""
------------------------------------------------------
This file is part of RobustGaussianFittingLibrary,
a free library WITHOUT ANY WARRANTY
Copyright: 2017-2020 LaTrobe University Melbourne,
2019-2020 Deutsches Elektronen-Synchrotron
------------------------------------------------------
"""
import nu... |
import os
import pandas as pd
import numpy as np
import json
import copy
import getpass
from time import gmtime, strftime
from .operations import OperationTools
from coconnect.tools.logger import Logger
from coconnect.tools.profiling import Profiler
from coconnect.tools.file_helpers import InputData
from coconnect im... |
from django.db import models
from django.forms.models import model_to_dict
from socializing.models import UserProfile
from django.forms import ModelForm, Textarea
from django import forms
from django.core.files.images import ImageFile
from django.core.exceptions import ObjectDoesNotExist
from constants import *
from pp... |
from typing import Dict, List, Optional
from fairseq.models.transformer import DEFAULT_MAX_SOURCE_POSITIONS, DEFAULT_MAX_TARGET_POSITIONS, TransformerEncoder, TransformerModel
import random
from fairseq.modules.multihead_attention import MultiheadAttention
import torch
from torch import Tensor
import torch.nn as nn... |
# Copyright [2019] [FORTH-ICS]
#
# 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... |
import os
import sys
from pprint import pprint
from altair.vegalite.v4.schema.core import UtcSingleTimeUnit
import ccxt
#import ccxt.async_support as ccxt
from pyti.exponential_moving_average import exponential_moving_average as ema
import pandas as pd
import datetime
import time
import numpy as np
import matplotlib
fr... |
# -*- coding: utf-8 -*-
u"""Lattice utilities.
:copyright: Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern.pkcollections import PKDict
from pykern.pkdebug import pkdc, pkdl... |
'''functions for handling IMAS XML data dictionaries
-------
'''
from .omas_utils import *
# add support for occurrences to each IDS
number_of_omas_only_add_datastructures_entries = 0
for structure in sorted(list(structures_filenames(omas_rcparams['default_imas_version']).keys())):
add_datastructures[structure] ... |
import torch
import torch.nn as nn
from torch import Tensor
from typing import Tuple
import math
import torch.nn.functional as F
from typing import Optional
import torch.nn.init as init
from torch.nn.modules.normalization import LayerNorm
import random
from utilities.constants import *
from utilities.device import ge... |
"""
Notes on functionals in pyquante2.
1. I would like for all operations here to be array-scale operations.
- This means e.g. np.power rather than pow
2. I would like as few memory copies as possible.
3. Need to decide how to handle redundant information, i.e.
- rhoa and rhob when non-spin-polarized
... |
'''
This is separate library file for the CSD.py applications
Its done this way to clean up the code in the main app
v00 - Initial Build
'''
# External Loads
from csdlib.vect import Vector as v2
import os.path
import numpy as np
import functools
from tkinter import filedialog, messagebox
from tkinter import *
import ... |
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import json
import logging
import operator
import os
from dataclasses import dataclass
from functools import reduce
from typing import Any, Iterable, It... |
from collections import OrderedDict
import itertools
from typing import Any, Generator, List, Optional, Type
from typing import OrderedDict as ODict # Prevent naming conflicts
import bpy.types
from bpy.props import *
from nodeitems_utils import NodeItem
from arm.logicnode.arm_sockets import ArmCustomSocket
import ar... |
import os
import tensorflow as tf
import matplotlib.pyplot as plt
import random
import pandas as pd
import numpy as np
import keras.initializers
import keras.optimizers
from networkx import Graph, find_cliques
from sklearn.metrics import roc_curve, auc
from keras.layers import Concatenate, Input, Embedding, Lambda, Ac... |
from __future__ import division
from PyTorch_YOLOv3.utils.utils import *
from PyTorch_YOLOv3.utils.datasets import *
from PyTorch_YOLOv3.models import *
from PyTorch_YOLOv3.utils.parse_config import *
from VertebraSegmentation.coordinate import *
from VertebraSegmentation.filp_and_rotate import *
from VertebraSegmen... |
import itertools
import os, random
import statistics
import matplotlib
import matplotlib.pyplot as plt
from analyze_entropy import comp_entropy
from analyze_prob_attn import compute_idf, get_ban_positions
# from data_collection import CUR_DIR, PROB_META_DIR, spec_name, MODEL_NAME, DATA_NAME
from util import convert_en... |
import time, itertools
from collections import OrderedDict
from .misc_utils import *
from . import distributions
concat = np.concatenate
import theano.tensor as T, theano
from importlib import import_module
import scipy.optimize
from .keras_theano_setup import floatX, FNOPTS
from keras.layers import Layer
#from .x im... |
from typing import Dict, List, Optional, Tuple
from datetime import datetime, timedelta
from cachetools import TTLCache
from pandas import DataFrame, Series
import numpy as np
## Indicator libs
import talib.abstract as ta
from finta import TA as fta
import technical.indicators as ftt
from technical.indicat... |
import logging
import pickle
import re
from collections import defaultdict
from itertools import chain
from pathlib import Path
from typing import Optional, List, Tuple, Union, cast
import markdown
from dominate.tags import (
a,
span,
br,
sup,
tr,
th,
td,
ul,
li,
em,
code,
... |
import numpy as np
import tvm
from tvm.contrib import graph_runtime
import topi.testing
import nnvm.symbol as sym
import nnvm.compiler
from nnvm.testing.config import ctx_list
from nnvm.testing.check_computation import check_function
def test_check_function():
# test the testing function
x = sym.Variable("x")... |
import pandas as pd
from matplotlib import pyplot as plt
import numpy as np
from sklearn.preprocessing import MinMaxScaler
import random
MAXLIFE = 120
SCALE = 1
RESCALE = 1
true_rul = []
test_engine_id = 0
training_engine_id = 0
def kink_RUL(cycle_list, max_cycle):
'''
Piecewise linear functi... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils.proj_adaptive_softmax import ProjectedAdaptiveLogSoftmax
class PositionalEmbedding(nn.Module):
def __init__(self, demb):
super(PositionalEmbedding, self).__init__()
self.demb = demb
inv_freq = 1 / (10000 ** (to... |
# coding=utf-8
# Copyright 2018 The Hypebot 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 requir... |
# Copyright (c) 2016-2021, <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:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the... |
"""
Unreify RDF values in KGTK files
"""
from argparse import ArgumentParser, Namespace
import attr
from pathlib import Path
import sys
import typing
from kgtk.kgtkformat import KgtkFormat
from kgtk.io.kgtkreader import KgtkReader, KgtkReaderMode, KgtkReaderOptions
from kgtk.io.kgtkwriter import KgtkWriter
from kgtk.u... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ldig : Language Detector with Infinite-Gram
# This code is available under the MIT License.
# (c)2011 <NAME> / Cybozu Labs Inc.
import os, sys, re, codecs, json
import optparse
import numpy
import html.entities as htmlentitydefs
import subprocess
import da
class ldig... |
from torch.utils.tensorboard import SummaryWriter
from tqdm import tqdm
from loader import data_loader
from parser import get_training_parser
from utils import *
from models import CausalMotionModel
from losses import criterion
from visualize import draw_image, draw_solo, draw_solo_all
def main(args):
# Set envi... |
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 23 18:14:28 2020
@author: zhang
"""
import random
import requests
import json
import time
import re
import os
import traceback
from collections import OrderedDict
from requests.adapters import HTTPAdapter
from tqdm import tqdm
from threading import Thread,... |
# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
# Recode by @mrismanaziz
# FROM Man-Userbot <https://github.com/mrismanaziz/Man-Userbot>
# t.me/SharingUserbot & t.me/L... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#----------------------------------------------------------------------------------------------------------------------------------------
#START OF contentVisualization.py
#----------------------------------------------------------------------------------------------------... |
#from __future__ import unicode_literals
from numpy import *
import matplotlib.pyplot as pl
from matplotlib.pyplot import *
from mpl_toolkits.basemap import Basemap
import pyproj
from pyproj import Geod
__all__ = ['AllSkyMap']
def angle_symbol(angle, round_to=1.0):
"""
Return a string representing an angle,... |
from __future__ import division, absolute_import, print_function
import os
from maya.api import OpenMayaAnim
from maya.api import OpenMaya
from mayafbx._base import (
FbxPropertyOption,
FbxOptions,
run_mel_command,
LOG)
from mayafbx._enums import (
QuaternionInterpolation,
ConvertUnit,
Up... |
from hoshino.config import SUPERUSERS
from hoshino import priv
from hoshino.log import new_logger
from hoshino.service import Service, sucmd
from hoshino.typing import CQEvent, CommandSession
from nonebot import NoneBot, on_startup, get_bot
from typing import Optional, Union
from re import Match
import asyncio
... |
import torch
from torch import nn as nn
import os
from einops import rearrange, repeat
from numpy import pi
import torch.nn.functional
from test.perciever import Perceiver
from test.pointNet import PointNetfeat
def fourier_encode(x, max_freq, num_bands=4):
x = x.unsqueeze(-1)
device, dtype, orig_x = x.device,... |
# -*- coding: utf-8 -*-
import pytz
import datetime
from pyramid.httpexceptions import HTTPFound
from pyramid.view import view_config
from stalker import db, Client, User, ClientUser, Studio, ProjectUser
from stalker.db.session import DBSession
import transaction
from webob import Response
from stalker_pyramid.view... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.