text
stringlengths
6.04k
39.5k
import sys sys.path.append("..") import enum import pathlib import numpy as np import typing as t from keras.models import load_model import plotly.graph_objects as go import pickle import plotly.express as px import sys import tqdm import pandas as pd import os import tensorflow as tf import h5py ROOT_DIR = pathlib.P...
import io import logging import os import shutil import tempfile from collections import OrderedDict from functools import partial from json import dumps from subprocess import CalledProcessError import click from anytree import AsciiStyle, ContStyle, Node, RenderTree from anytree.exporter import DictExporter from pac...
import pandas as pd import numpy as np # Models from sklearn.linear_model import LogisticRegression # Best Parameters search and test on k-fold cross validation for random sampling. from sklearn.model_selection import GridSearchCV from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt #...
import re from django.conf import settings from django.core.paginator import Paginator from django.http import Http404 from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.urls.base import reverse from django.utils.http import urlencode from wagtail import h...
import requests, json, os import math import uuid from starlette.responses import JSONResponse from sqlalchemy import create_engine from wallet import Wallet, NetworkEnvironment # ergopad.io library from fastapi import APIRouter, status from typing import Optional from pydantic import BaseModel from time import time, ...
#!/bin/python import spacy import logging import pickle import string import re import sys import os import math BASIC = 0 LEMMATIZATION = 10 REMOVE_STOPWORDS = 20 LOW = 30 MEDIUM = 40 HIGH = 50 LOG_FILENAME = 'classification_tools.log' LOG_LEVEL = logging.INFO SPACY_MODEL = 'en_core_web_sm' MAX_DIM = 1000000 # 100...
import os import sys import time import platform import numpy as np from PyQt5 import QtWidgets, QtGui, QtCore import pyaudio from player import Player from playlist import PlayListView, PlayListModel import batch class ComboBox(QtWidgets.QComboBox): popuped = QtCore.pyqtSignal() def showPopup(self): ...
import codecs import os import re from itertools import chain from politeness.constants import POSITIVE_WORDS_PATH, NEGATIVE_WORDS_PATH #### HEDGES #################################################################### #### Words that are typically used to lessen the impact of an utterance. For #### example, on...
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by <NAME> (<EMAIL>) # ------------------------------------------------------------------------------ from __future__ import absolute_import from __future__ import divis...
# 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 PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
""" # 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 a...
"""Compute 2pt stats in zeldovich approximation """ #imports from scipy.interpolate import InterpolatedUnivariateSpline as interpolate from scipy.misc import derivative import pyfftw from scipy.special import loggamma from scipy.interpolate import interp1d import numpy as np def loginterp(x, y, yint = None, side = "b...
""" Generate a first guess file for <NAME> to use for the monthly COOP QC, will hopefully save him some time... sites = [] for line in open('/tmp/SCIA1107.txt'): tokens = line.split(",") if tokens[0] in ["", "2011", "YR"]: continue site = "IA%04i" % (int(tokens[0]),) if not site in sites: ...
"""Utilities for dealing with Shaders in OpenGL 3.3+. """ from ctypes import * from collections import namedtuple import weakref from typing import Tuple, Iterable from pyglet.gl import * from pyglet import gl import numpy as np class ShaderException(Exception): pass # Thank you <NAME> for writing part of th...
#!/usr/bin/python3 import argparse import paho.mqtt.client as mqtt import datetime from time import sleep from binascii import unhexlify from random import randint from pycomfoconnect import * import getopt ## Configuration ###############################################################################################...
from typing import List, Dict, Callable from checklist_fork.checklist.test_suite import TestSuite from checklist_fork.checklist.editor import Editor from munch import Munch import itertools from collections import OrderedDict, namedtuple from typing import Tuple, Collection import src.config as cfg import regex as re...
# -*- coding: utf-8 -*- # @Time : 2019/8/15 23:39 # @Author : kean # @Email : ? # @File : process_data.py # @Software: PyCharm import re from collections import Counter from mylogger import logger import pandas as pd from copy import copy import collections from tqdm import tqdm import random seed = 1233 ran...
""" University of Illinois/NCSA Open Source License Copyright(C) 2014-2015, The Board of Trustees of the University of Illinois. All rights reserved. Developed by: Visual Analytics App...
import config import Efficient_Net_encoder import Transformer_decoder import efficientnet.tfkeras as efn import time import re import sys import pickle from datetime import datetime import matplotlib.pyplot as plt import tensorflow as tf import matplotlib as mpl mpl.use("Agg") # Set TPUs tpu = tf.distribute.cluster_...
import gzip import random import socket from abc import ABC from queue import Queue from threading import Thread, Lock from typing import List, Set, Tuple, Dict, Type, Optional from pkg_resources import resource_stream import pyscrabble.protocol as proto from pyscrabble.model import Player, Board, Tile, SquareType w...
# Copyright (c) 2020, <NAME>. 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 os import csv import subprocess import pytz from django.utils import timezone from datetime import datetime, timedelta from glob import glob from ftplib import FTP from zipfile import ZipFile from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.exceptio...
import numpy as np import tensorflow as tf import pdb from matplotlib import pyplot as plt re = 200.0 # Reynolds number re = U(2R)/nu nuMean = 0.001 nuStd = 0.9 L = 1.0 # length of pipe R = 0.05 # rho = 1 # density periodicBC = True # or false dP = 0.1 eps = 1e-4 coef_reg = 1e-5 learning_rate = ...
#!/usr/bin/env python import numpy as np import pandas as pd def sa_sd_time(acc, dt, t1_range=None, t1min=1e-06, t1max=5, nt=100, c=0.05, m=1): """ Calculates spectral acceleration and displacement with time for the given ground accelerations :param t1_range: give values instead of calculating them from ...
# coding=utf-8 __author__ = "<NAME>" import argparse import gc import logging import os import pathlib import random import sys import time from typing import Any, Dict, List, Tuple import numpy as np import torch import torchvision from torch.nn import L1Loss from torch.utils.data import DataLoader from torch.utils....
import logging import re import torch from ..graph import Graph, Model, Node from ..nn.pytorch import InputChoice, LayerChoice, Placeholder from ..operation import Cell from .op_types import MODULE_EXCEPT_LIST, BasicOpsPT, OpTypeName from .utils import _convert_name, build_full_name _logger = logging.getLogger(__nam...
# Copyright 2018 The TensorFlow Probability 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 applicable law o...
import numpy as np import xarray as xr import cmocean import cmocean import matplotlib as mpl import matplotlib.pyplot as plt from OHC import OHC_detrend_levels from maps import map_eq_earth from grid import create_tdepth, create_dz_mean from paths import path_results, path_samoc from plotting import discrete_cmap, sh...
import logging from typing import Any, Dict, List, Set, Tuple, Optional from apiclient.sample_tools import client as googleapiclient from django_auth_ldap.backend import LDAPBackend, _LDAPUser import django.contrib.auth from django.contrib.auth.backends import RemoteUserBackend from django.conf import settings from dj...
""" Provides classes to encapsulate and manipulate diffuse sources. $Header: /nfs/slac/g/glast/ground/cvs/pointlike/python/uw/like/roi_diffuse.py,v 1.32 2012/09/13 06:16:44 kerrm Exp $ author: <NAME> """ import sys import numpy as np from uw.utilities.convolution import BackgroundConvolution from uw.utilities import ...
import typer import sys from click import Choice from typing import Optional, List, Tuple from pathlib import Path from logging import basicConfig, DEBUG from atlassian import Confluence from atlassian.errors import ApiError from dataclasses import dataclass, field, astuple from requests.exceptions import ConnectionErr...
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2020 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 # # https://www.apache.org/licenses/LICENSE-2.0 # ...
""" ElGamal Algorithms for the Helios Voting System This is a copy of algs.py now made more El-Gamal specific in naming, for modularity purposes. <NAME> <EMAIL> """ import hashlib import logging from .algs import Utils class Cryptosystem(object): def __init__(self): self.p = None self.q = None...
""" Description: Author: <NAME> (<EMAIL>) Date: 2021-10-24 16:08:51 LastEditors: <NAME> (<EMAIL>) LastEditTime: 2021-10-24 16:08:51 """ #!/usr/bin/env python # coding=UTF-8 import argparse import os from typing import Dict, Iterable, List import mlflow import numpy as np import torch import torch.nn as nn import torch...
import os from multiprocessing import Pool import itertools from os.path import join, dirname, realpath, isfile import argparse import copy import sys import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap import biotite.sequence as seq import biotite.sequence.align as align imp...
import random import math import json SIRINA = 7 VISINA = 6 ZETON_1 = 1 ZETON_2 = 2 IGRALEC_1 = "IGRALEC 1" IGRALEC_2 = "IGRALEC 2" NAKLJUCNO = "<NAME>" IZBIRA_NAKLJUCNO = "N" RACUNALNIK = "RAČUNALNIK" IZBIRA_RACUNALNIK = "R" DVA_IGRALCA = "Drugo" NI_SE_KONEC = "<NAME>." NEODLOCENO = "Izenačeno je." DOLZINA_ZA_ZMAG...
import mock import os import pytest import shutil import subprocess import sys import tempfile import commit_coverage as cover if sys.version_info > (3, ): import builtins else: import __builtin__ as builtins @pytest.fixture() def fake_cover_project(request): cover_project_area = tempfile.mkdtemp() ...
# Copyright (c) 2019-2020 <NAME> # License: MIT License # Created 2019-03-06 from typing import TYPE_CHECKING, Union, Tuple, List import math from ezdxf.math import Vector from ezdxf.lldxf import const from ezdxf.lldxf.attributes import DXFAttr, DXFAttributes, DefSubclass, XType from ezdxf.lldxf.const import SUBCLASS_...
"""Denon HEOS Media Player.""" from __future__ import annotations import asyncio from datetime import timedelta import logging from pyheos import Heos, HeosError, const as heos_const import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import CONF_HOST...
from __future__ import annotations import os import struct from typing import Type, Union, Tuple, IO, List, Optional from amulet import Block from amulet.api.registry import BlockManager from amulet.api.entity import Entity from amulet.api.block_entity import BlockEntity import amulet_nbt import numpy INT_TRIPLET ...
# Released under the MIT License. See LICENSE for details. # """Testing entity functionality.""" from __future__ import annotations from typing import TYPE_CHECKING from enum import Enum, unique import pytest # Seeming to get some non-deterministic behavior here as of pylint 2.6.0 # Where sometimes pylint wants the...
"""This is the processor that digests the raw data from MLX90640 and analyzes it.""" import argparse import matplotlib as mp import matplotlib.pyplot as pl import numpy as np import os import pathlib import shutil import subprocess import sys from xpython.common import files, logger class MLX90640Frame(logger.Loggi...
__author__ = "<NAME>" __copyright__ = "Copyright 2015-2019, <NAME>" __email__ = "<EMAIL>" __license__ = "MIT" import os import json import re import inspect import textwrap import platform from itertools import chain import collections import multiprocessing import string import shlex import sys from urllib.parse impo...
""" GcodeTextEdit ------------- QPlainTextEdit based G-code editor with syntax highlighting. """ import os import oyaml as yaml from qtpy.QtCore import (Qt, QRect, QRegularExpression, QEvent, Slot, Signal, Property) from qtpy.QtGui import (QFont, QColor, QPainter, QSyntaxHighlighter, ...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
""" A set of functions devoted to binding key presses and registering callbacks. This will automatically hook into the event callbacks in event.py. The two functions of interest here are 'bind_global_key' and 'bind_key'. Most of the other functions facilitate the use of those two, but you may need them if you're getti...
''' /* * @Author: <NAME> (<EMAIL>) * @Date: 2021-08-28 15:45:26 * @Last Modified by: <NAME> * @Last Modified time: 2021-08-28 22:01:06 */ NOTE: script for Fig. 1. Transcend code was adapated from the original paper, please ask <NAME> and <NAME> for access. Accumulatively on 1 month explanation: Train...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2009-2016 <NAME>. All rights reserved. # Distributed under the (new) BSD License. # ----------------------------------------------------------------------------- """ `GLFW <http://www.glfw.org>`_ is a...
""" Automated reduction steps for P200 DBSP. """ import datetime import os import shutil from typing import Tuple, List, Callable import matplotlib.pyplot as plt from astropy.io import fits from astropy.table import Table, Row from astropy.coordinates import Angle, SkyCoord import astropy.units as u from configobj ...
# coding=utf-8 """This module contains shared functionality for mapping-related functions across arcpy versions.""" # Python 2/3 compatibility # pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-order,wrong-import-position,import-error,no-name-in-module from __future__ import (absolute_import, divisi...
__all__ = [ 'BadRequestException', 'BadStateException', 'CsrfException', 'DropboxOAuth2Flow', 'DropboxOAuth2FlowNoRedirect', 'NotApprovedException', 'OAuth2FlowNoRedirectResult', 'OAuth2FlowResult', 'ProviderException', ] import base64 import os import six import urllib from .sessi...
import re import struct import sys from collections.abc import Mapping from datetime import datetime, timedelta, timezone from io import BytesIO from .types import ( CBORDecodeValueError, CBORDecodeEOF, CBORTag, undefined, break_marker, CBORSimpleValue, FrozenDict) timestamp_re = re.compile(r'^(\d{4})-(\d\d)-...
#!/usr/bin/env python3 """ Module : Orf Description : The main entry point for the program. Copyright : (c) <NAME>, 27 nov. 2020 License : MIT Maintainer : <EMAIL> Tool to retrieve toxin antitoxin (TA) systems in genomes or metagenomes. """ import Object_MetaF as obj import csv import re from subprocess...
import tensorflow as tf from tflearn.layers.conv import global_avg_pool from tensorflow.contrib.layers import batch_norm, flatten from tensorflow.contrib.layers import xavier_initializer from tensorflow.contrib.framework import arg_scope import cifar10_input import pickle import openpyxl from xlutils.copy import copy ...
# Copyright 2019 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
import os, pdb import numpy as np import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) import configparser import featurepointnet_tf_util as tf_util import featurepointnet_model_util as model_util from calibration import Calibration, OmniCalibration batch_size = 6 #TODO: Update if ne...
"""Doublet detection in single-cell RNA-seq data.""" import collections import warnings import numpy as np from sklearn.utils import check_array from sklearn.utils.sparsefuncs_fast import inplace_csr_row_normalize_l1 from scipy.io import mmread from scipy.stats import hypergeom import scipy.sparse as sp_sparse from s...
# Copyright (C) 2018 Intel Corporation # # SPDX-License-Identifier: MIT from itertools import product from io import BytesIO from PIL import Image import os from os import path as osp import git import io from unittest import mock from rest_framework.test import APIClient, APITestCase from rest_framework import stat...
#!/usr/bin/python # Copyright (c) 2020, 2022 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
from __future__ import division, absolute_import, print_function import os import multiprocessing as mp import warnings import numpy as np from tqdm import tqdm import matplotlib.pyplot as plt from sklearn.metrics import roc_curve, auc, roc_auc_score from sklearn.linear_model import LogisticRegressionCV from sklearn.p...
import os import secrets from decimal import Decimal from django.contrib.auth import views as auth_views from django.contrib.auth.decorators import login_required, user_passes_test from django.core.mail import send_mail from django.core.paginator import Paginator from django.db import OperationalError from django.shor...
""" The MIT License (MIT) Copyright (c) 2017 <NAME> """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import numpy as np import scipy as scp import math import logging import warnings logging.basicConfig(format='%(asctime)s %(leve...
# encoding: utf-8 # Copyright (C) 2002-2016, <NAME> <<EMAIL>> # and ftputil contributors (see `doc/contributors.txt`) # See the file LICENSE for licensing terms. from __future__ import unicode_literals import ftplib import itertools import os import pickle import posixpath import random import time import warnings i...
#!/usr/bin/env python """ Runs BFAST on single-end or paired-end data. TODO: more documentation TODO: - auto-detect gzip or bz2 - split options (?) - queue lengths (?) - assumes reference always has been indexed - main and secondary indexes - scoring matrix file ? - read group file ? usage...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * # the main idea is to just make sure every line of code is run once, # not to instantiate all eight different # implementations/configurations and run them all. Th...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse from natsort import natsorted import funannotate.library as lib from Bio import SeqIO from collections import OrderedDict def scaffold2Dict(input): # get scaffold names/lengths scaffLen = {} with open(input, 'r') as seqin:...
""" Tor Browser Launcher https://github.com/micahflee/torbrowser-launcher/ Copyright (c) 2013-2017 <NAME> <<EMAIL>> 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 ...
""" first_order to train a group of keys """ # from sklearn.metrics.pairwise import cosine_similarity import copy import matplotlib.pyplot as plt import numpy as np import torch from neurodiffeq import diff # the differentiation operation from neurodiffeq.conditions import IVP # the initial condition from neurodiff...
######## A Healthcare Domain Chatbot to simulate the predictions of a General Physician ######## ######## A pragmatic Approach for Diagnosis ############ # Importing the libraries from tkinter import * from tkinter import messagebox import os import webbrowser import numpy as np import pandas as pd cla...
import datetime from typing import Any, Dict from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.messages.views import SuccessMessageMixin from django.db.models import Count, Q from django.forms impo...
from ..free_module import FreeModuleElement from ..symmetric import SymmetricRingElement from ..simplicial import Simplex from ..utils import pairwise from itertools import combinations, product class Cube(tuple): r"""A cube :math:`(I_1, \dots, I_n)`. A cube is a finite tuple of elements in :math:`\{0,1,2\}`...
r""" Ambient lattices and ambient spaces """ from __future__ import absolute_import #***************************************************************************** # Copyright (C) 2008-2009 <NAME> # Copyright (C) 2008-2013 <NAME> <nthiery at users.sf.net> # # Distributed under the terms of the GNU General P...
# coding=utf-8 """ Module holding batch processing for Earth Engine """ import ee import ee.data from . import tools import os import functools import traceback import time if not ee.data._initialized: ee.Initialize() def recrusive_delete_asset(assetId): info = ee.data.getInfo(assetId) if info: t...
# Copyright 2013 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
import os if os.name != "nt": exit() import json import base64 import sqlite3 import win32crypt from Crypto.Cipher import AES import shutil from codecs import encode import getpass from re import findall from json import loads, dumps from base64 import b64decode from subprocess import Popen, PIPE fro...
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from ...
# Copyright 2020 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
''' show_monitor.py IOSXE parsers for the following show commands: * show monitor * show monitor session {session} * show monitor session all * show monitor capture ''' # Python import re import xmltodict from netaddr import IPAddress, IPNetwork # Metaparser from genie.metaparser import MetaParser ...
import argparse import os import csv import sys import matplotlib.pyplot as plt import itertools # import seaborn as sns import collections import pandas as pd def statistics(csv_path): data = pd.read_csv(csv_path) # data = data.sort_values(by=['target']) print(data) var = data.var() print(var[0]...
from e3sm_to_cmip.util import terminate from e3sm_to_cmip.util import print_debug from e3sm_to_cmip.util import print_message from e3sm_to_cmip.util import find_mpas_files from e3sm_to_cmip.util import find_atm_files from e3sm_to_cmip.mpas import write_netcdf from e3sm_to_cmip import resources from tqdm import tqdm imp...
import math import re from typing import List, Optional import log from css_colors import COLORS from datamodel import Expression, Number, Undefined, String, Symbol from environment import global_attr from evaluate_apply import Frame from helper import verify_exact_callable_length, verify_min_callable_length from prim...
############################################################################## # Copyright 2016-2018 Rigetti Computing # # 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...
from mapedit import * from mapedit.widgets import * class MapAdd: def __init__(self, events, tile): self.events = events self.tile = tile def exec(self, instance, stack=None): current_map = state.current_map z = self.tile.layer craise = instance.canvas.tag_ra...
# -*- coding: utf-8 -*- """ Shamelessly, but graciously, taken from <NAME> and <NAME>'s suntanspy. Original comment: Tools for interpolating irregularly spaced data onto irregularly spaced points Largely a wrapper for other interpolation methods such as scipy.griddata and scipy.Rbf (radial basis ...
""" Component that will perform inference via torchserve. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/image_processing.deepstack_object """ from collections import namedtuple import io import logging import time import re import json from pathlib impo...
from multiprocessing import Process,Queue,shared_memory import pyautogui import keyboard import psutil import os import win32gui import win32file import pathlib import cv2 import logging import time import numpy as np import traceback from ctypes import windll from EDAutopilot.utils.journal import * from EDAutopilot.ut...
from __future__ import absolute_import, division import collections import copy import logging import threading import time from kafka.vendor import six from .. import errors as Errors from ..metrics.measurable import AnonMeasurable from ..metrics.stats import Avg, Count, Max, Rate from ..protocol.produce import Pro...
# 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. # # ## ### ##...
from . import phpast as php import ast as py unary_ops = { '~': py.Invert, '!': py.Not, '+': py.UAdd, '-': py.USub, } bool_ops = { '&&': py.And, '||': py.Or, 'and': py.And, 'or': py.Or, } cmp_ops = { '!=': py.NotEq, '!==': py.NotEq, '<>': py.NotEq, '<': py.Lt, '<='...
# coding: utf-8 import numbers import numpy as np import matplotlib.pyplot as plt import matplotlib.lines as mlines from matplotlib.projections.polar import PolarAxes from matplotlib.projections import register_projection from .layout import FigAxes_create, set_ax_info, measure_canvas from .cmaps import color_dict_cre...
import json import logging import os import tempfile from urllib.request import urlretrieve import boto3 import pandas as pd import pytest from featuretools import variable_types from featuretools.entityset import ( EntitySet, Relationship, deserialize, serialize ) from featuretools.entityset.serializ...
# Copyright The PyTorch Lightning team. # # 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 i...
# File: terraformcloud_connector.py # # Copyright (c) 2020 Splunk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# Copyright (C) 2007 <NAME>, alexandre (dot) conrad (at) gmail (dot) com # # This module is part of FormAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import cgi import warnings import logging logger = logging.getLogger('formalchemy.' + __name__) MIN_SA_VERSION = '...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from a2c_ppo_acktr.distributions import Bernoulli, Categorical, DiagGaussian from a2c_ppo_acktr.utils import init import time class Flatten(nn.Module): def forward(self, x): return x.view(x.size(0), -1) class Policy(nn...
import os, time, itertools import numpy as np import matplotlib.pyplot as plt from obspy.signal.detrend import polynomial import bead_util as bu import peakdetect as pdet import scipy.optimize as opti import scipy.signal as signal from tqdm import tqdm from joblib import Parallel, delayed ncore = 20 np.random.seed...
import os import time from tkinter import RIGHT, LEFT, Entry, Button, Label, Checkbutton, Toplevel, Frame, StringVar, IntVar, INSERT from tkinter.filedialog import askdirectory from typing import Tuple, Any from tanager_feeder.dialogs.dialog import Dialog from tanager_feeder.dialogs.error_dialog import ErrorDialog fro...
# import Weapon # import Armor import CharacterClass import Dice import math import Race class Character: # General info isNPC = None name = None alignment = None characterClass = None level = 1 diety = None homeland = None race = None size = None gender = None age = None heightFt = 0 ...
''' This file is part of openSMILE. Copyright (c) audEERING GmbH. All rights reserved. See the file COPYING for details on license terms. ''' from ctypes import * from typing import Any, Callable, Dict, List, Optional import json import os import numpy as np if os.name == 'nt': smileapi_path = os.path.join(os.ge...
# (c) 2015, <NAME> <<EMAIL>> # # 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. # # Ansible i...