text
stringlengths
8.04k
46.5k
from __future__ import unicode_literals __doc__ = """ # Copyright 2007 <NAME> and Splunk, Inc. - <EMAIL> # This file contains a simple imap -> splunk processor # It is used by splunk to download mail into the splunk server # # Change History # -------------- # Date Author Changes # ----- ...
# version code d7da415c4b69+ # Please fill out this stencil and submit using the provided submission script. from resources.mat import Mat from resources.vec import Vec from resources.matutil import mat2rowdict, mat2coldict, rowdict2mat, coldict2mat, listlist2mat from resources.vecutil import list2vec from resources.G...
#!/usr/bin/env python # -*- coding: UTF-8 -*- ########################################################### # LitStats.py - Display stats for Litcube's Universe import os, sys, re import traceback import curses from time import sleep from math import floor from collections import deque from textwrap import wrap ###...
import flask from flask import render_template from flask import request from flask import url_for from flask import jsonify # For AJAX transactions import uuid # MongoDB Python module from pymongo import MongoClient import json import logging # Date handling import arrow # Replacement for datetime, based on moment...
from logging import config, getLogger, Logger from argparse import ArgumentParser import os import regex from .node import FailureNode, NonTerminalNode from .exception import TacParserException, ParseException from .baseparser import postorder_travel from .expegparser import ExPegParser from .astactions import AstAct...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2017, Battelle Memorial Institute # 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. Redistri...
import rclpy # Import the ROS client library for Python from rclpy.node import Node # Enables the use of rclpy's Node class from std_msgs.msg import Float64MultiArray # Enable use of the std_msgs/Float64MultiArray message type from lgsvl_msgs.msg import Detection3DArray from autoware_auto_msgs.msg import BoundingBoxArr...
from .ptrace import * import struct import subprocess import errno import collections import os import signal import time import logging import re from capstone import Cs, CS_ARCH_X86, CS_MODE_64 from .utils import u64, u32 logging = logging.getLogger("libdebug") class DebugFail(Exception): pass class Memory(co...
""" .. module:: repository :platform: Unix, Windows :synopsis: A module for examining a single git repository .. moduleauthor:: <NAME> <<EMAIL>> """ import os import sys import datetime import time import numpy as np import json import logging import tempfile import shutil from git import Repo, GitCommandErr...
import json import weakref from copy import copy, deepcopy from enum import Enum, EnumMeta, _EnumDict from hashlib import sha256 from io import StringIO, TextIOWrapper from typing import List, Optional, Set, Union from urllib.parse import quote from uuid import uuid4 from numpydoc.docscrape import ClassDoc from typegu...
from __future__ import annotations import copy from typing import Tuple, Union, Optional, Any, TYPE_CHECKING import numpy as np import scipy.sparse as sci_sparse from pyNastran.dev.solver.stiffness.shells import build_kbb_cquad4, build_kbb_cquad8 from .utils import lambda1d, DOF_MAP #from pyNastran.bdf.cards.elements...
# Dash and Plotly from dash import Dash import dash from dash.dependencies import Input, Output, State, MATCH, ALL, ALLSMALLER from dash.exceptions import PreventUpdate import dash_daq as daq import dash_html_components as html import dash_core_components as dcc import plotly.express as px import plotly.graph_objects a...
# TODO: Write a targettable ReactionMenuOption subclass, that implements targetMember and targetRole on a per-option basis. Use this to write ReactionRolePickers with multipleChoice=False! import inspect from discord import Embed, Colour, NotFound, HTTPException, Forbidden, Member, Message from ..bbConfig import bbCon...
"""Process A/V dataset.""" import os import os.path as op import time import warnings import numpy as np from scipy import signal, stats import matplotlib.pyplot as plt import openpyxl import pandas as pd with warnings.catch_warnings(record=True): warnings.simplefilter('ignore', FutureWarning) from nilearn.g...
""" Tkinter Crypto GUI to get account balances, transaction history and more from various crypto platforms Currently supports: Bitpanda, Binance Smart Chain Notes ----- Requires valid API keys for: - Bitpanda - Forex Crypto Stock Exchange - ExchangeRate-API (https://www.exchangerate-api.com/) - Binance...
import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import os import sys import random import torch import torchaudio import torch.nn.functional as F import numpy as np import time import struct from torchaudio.compliance.kaldi import fbank from torch.utils.data import Dataset,DataLoader from t...
import sys import os import glob import json import subprocess import threading from threading import Timer import time from shutil import copy import example_logparser from example_exceptions import LogCheckFail from example_exceptions import MissingExecutable from example_exceptions import ExampleFail from ExampleLog...
#!/usr/bin/env python3 # Copyright 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """Main DrQA reader training script.""" import socket import argparse import torch import numpy as np import j...
# Built-in libraries import json import math import random from functools import partial from typing import Any, Callable, Dict, List import numpy as np # Plotting settings import plotly.graph_objects as go import seaborn as sns from plotly.offline import plot as plotoffline from .data_input import check_valid_batch...
"""Module to interact with your Panasonic Viera TV.""" from enum import Enum import logging import random import socket import xml.etree.ElementTree as ET import base64 import binascii import struct import hmac, hashlib import time from Crypto.Cipher import AES try: from urllib.request import urlopen, Request, HTTP...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed May 10 10:55:20 2017 @author: <NAME> """ from __future__ import absolute_import, division, print_function from builtins import (open, str, range, object) from collections import Counter, OrderedDict import copy from werkzeug.uti...
#!/usr/bin/env python # # Copyright (C) 2016 The Android Open Source Project # # 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 req...
from __future__ import with_statement from contextlib import contextmanager import datetime import faulthandler import os import re import signal import subprocess import sys import tempfile import unittest from textwrap import dedent try: import threading HAVE_THREADS = True except ImportError: HAVE_THREA...
# coding: utf-8 from __future__ import print_function, unicode_literals, division import os import io import requests from datetime import datetime, timedelta from dateutil import parser from collections import OrderedDict import pytz import logging import time from . import utils from . import objects from campbot.p...
''' S-Expression parser written in Python This module provides a generic parser `SexpParser` that coverts a python list-based S-Expression into a python object model. Each expression in the list-based S-Expression is defined as a recursive ``list`` representation in the form of :: [ <line number>, <key>, <value>...
import argparse import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from base import BaseModel, BaseModule from model.model_helpers import Beam from torch.autograd import Variable import matplotlib.pyplot as plt import math class KWSModel(BaseModel): def __init__(self, hiddenDNNV,...
import base64 import cloudpickle from copy import deepcopy from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple import numpy as np from triad import assert_or_throw, to_uuid from triad.utils.convert import get_full_type_path from tune._utils import product from tune._utils.math import ( normal_t...
import base64 import boto3 import botocore import configparser import glob import hashlib import io import json import logging import os import pprint import random import re import subprocess import sys import tempfile import time from reform import ConfigManager, SecretsManager, ReformSettings from jinja2 import Env...
from mathsonmars.utils.fileutils import FileUtils from mathsonmars.utils.listutils import ListUtils class ActivityTypeConstants(): MADS = "mads" FUN_CHUNKS_OR_FRIENDLY_ACTIVITY = "fun_chunks_or_friendly_activity" BOX_METHOD = "box_method" class BoxMethodTypeConstants(): SUM_OF_A_B_EQ_TOTAL = "Sum of ...
from __future__ import division import collections import itertools from typing import (List, Dict, Callable, Tuple, Iterable, Set, Counter, Union, Optional) NGramsType = Counter[Tuple[str]] ScoreType = Dict[str, float] RougeType = Dict[str, Dict[str, float]] try: from math import isclose exc...
# -*- coding: utf8 -*- # Copyright 2019 JSALT2019 Distant Supervision 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 # # U...
# -*- coding: utf-8 -*- """ Created on Tue Feb 12 11:37:05 2019 @author: polsterc16 """ __relPath = "EPH_STAR_BrightStarCatalogue" def getStarPos(finder="Polaris", year=None): ''' INPUTS: * finder: + string mit sternenname (durchsucht tags) ODER + tuple mit id-typ(string) und id zB ("sao...
r''' The 1D advection-diffusion problem ---------------------------------- The equation to be solved is .. math:: \frac{\partial}{\partial t} \psi(x,t) &= -\frac{1}{w(x)} \frac{\partial}{\partial x} \left[ w(x) ~ \mathcal{F}(x,t) \right] + \dot{\psi}\\ \mathcal{F} &= U(x) \psi(x) -K(x) ~ \frac{\partial \psi}...
"""Module to read and parse native Phoenix Geophysics data formats of the MTU-5C Family This module implements Streamed readers for segmented-decimated continuus-decimated and native sampling rate time series formats of the MTU-5C family. """ __author__ = '<NAME>' from numpy import empty, fromfile, float32, append f...
# Code from https://github.com/abhuse/pytorch-efficientnet from math import ceil import torch import torch.nn as nn import torch.nn.functional as F from torch._six import container_abcs from torch.utils import model_zoo def _pair(x): if isinstance(x, container_abcs.Iterable): return x return (x, x) ...
#!/usr/local/bin/python2.7 # encoding: utf-8 ''' Axile -- Outil de conception/simulation de parapentes Nervures Classe NSpline Description : @author: puiseux @copyright: 2016 Nervures. All rights reserved. @contact: <EMAIL> ''' from numbers import Number import numpy as np import cPickle from numpy import asa...
#!/usr/bin/env python2 # # BSD LICENSE # # Copyright(c) 2015 PT Comunicacoes. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain t...
#!/usr/bin/env python3 ''' creality_dwin_lcd_customizer.py Generate a custom build of Marlin + DWIN_SET directory for Creality printers that use DWIN LCDs, including: * Ender-3 V2 * Ender 3 Max * Ender 5 * Ender 5+ * Ender 5 Pro * Ender 6 * CR10S Pro * CR10S Pro V2 * CR10 Max * ...
# -*-coding:utf-8-*- import numpy as np import pickle import cv2 import os import tarfile import sys import glob import math import tensorflow as tf from six.moves import urllib ''' for data reading and data augmentation ''' def generate_vali_batch(vali_data, vali_label, vali_batch_size): offset = np.random.choi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # =============================================================== # Copyright (C) 2018 HuangYk. # Licensed under The MIT Lincese. # # Filename : TorchSoa.py # Author : HuangYK # Last Modified: 2019-03-21 14:19 # Description : # # ================================...
import curses import collections import tempfile import subprocess import multidict from metaindex import shared import metaindex.cache import metaindex.indexer from cursedspace import Key, InputLine, ShellContext from metaindexmanager import command from metaindexmanager import utils from metaindexmanager.utils im...
# -*- coding: utf-8 -*- """Orbit SkyOffset Frames. Like `~astropy.coordinates.Galactocentric` needs ``galcen_coord`` and other information to convert to/from heliocentric or geocentric coordinate systems, the `OrbitPseudoFrame` needs information about the orbit (phase-space position and integration time) and the pote...
# Copyright 2019 <NAME> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
""" Core Function based on https://github.com/kbairak/pipepy/blob/master/src/pipepy/pipepy.py """ from .base import * from .exceptions import CmdError from .utils import ExecFile, is_iterable from typing import Dict CMD_ALWAYS_RAISE = False CMD_ALWAYS_STREAM = False CMD_INTERACTIVE = False _CMD_JOBS: Dict[int, "C...
from pdfminer.utils import bbox2str import re def isclose(a, b, abs_tol=0.0, rel_tol=1e-09): # rel_tol is a relative tolerance, it is multiplied by the greater of the magnitudes of the two arguments; as the values get larger, so does the allowed difference between them while still considering them equal. # abs...
""" oauthlib.oauth2.draft_25.grant_types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import unicode_literals import json from oauthlib import common from oauthlib.oauth2.draft25 import errors, utils from oauthlib.uri_validate import is_absolute_uri class RequestValidator(object): def validate_client...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Author: <NAME>., https://oliz.io Description: Minimal static site generator easy to use with GitHub Pages o.s. Website: https://oliz.io/ggpy/ Version: 2.0.1+dev License: Dual-licensed under GNU AGPLv3 or MIT License, see LICENSE.txt file for details. THE SOFTW...
""" sepp_base ~~~~~~~~~ A more abstract approach to SEPP type algorithms. """ from . import predictors from . import logger as _ocp_logger from . import data as _ocp_data import numpy as _np import datetime as _datetime import logging as _logging _logger = _logging.getLogger(__name__) class ModelBase(): """Inte...
## ## imports ## import copy import argparse import time import yaml import logging from logging.handlers import RotatingFileHandler import x0state import x0ip import x0serial import x0state import misc import x0genericcmd import x0opcmd import x0refcmd import x0netcontrol import x0keys import x0smartpower import x0sm...
import asyncio import aiohttp import logging import logzero import json from logzero import logger logzero.loglevel(logging.INFO) ORIGINAL_FORMAT = "https://wellcomelibrary.org/iiif/{bnum}/manifest" NEW_FORMAT = "https://iiif-test.wellcomecollection.org/presentation/v2/{bnum}" rules = { "": { ...
# -*- coding: utf-8 -*- from vanilla import * from AppKit import * from fontTools.pens.cocoaPen import CocoaPen from mojo.canvas import Canvas from mojo.drawingTools import * from fontParts.world import CurrentFont from lib.eventTools.eventManager import postEvent, publishEvent from mojo.events import addObserver, rem...
# -*- coding: utf-8 -*- from time import time from collections import deque import numpy as np import math,logging from fastdtw import fastdtw from concurrent.futures import ProcessPoolExecutor, as_completed from collections import defaultdict from utils import * from heapq import * import os limiteDist = 20 #Get the...
"""Layers common to multiple models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import range # pylint: disable=redefined-builtin import tensorflow as tf from tensorflow.python.framework import function from tensor...
import re import math import numpy as np import pandas as pd import pretty_midi # # Classes # class Note: C, Db, D, Eb, E, F, Gb, G, Ab, A, Bb, B = range(0, 12) def __init__(self, pitch=0, startBeat=0., startTime=0., durBeats=1., durS=1., instrument=1, prevNote=None, nextNote=None, other...
import os import sys import shutil from gi.repository import Gtk, Gdk, GLib, GObject, Pango from gi.repository.GdkPixbuf import Pixbuf from pychess.System import uistuff from pychess.System.prefix import getEngineDataPrefix, addDataPrefix from pychess.Utils.IconLoader import get_pixbuf from pychess.Players.engineNest...
# -*- coding: utf-8 -*- """ Created on Thu Jam 10 3:42 2019 @author: Bob Summary: Allows users to search for data and displays it in a useful way. Details: After gathering, cleaning, and analyzing data, this program is run to create the UI. It firsts prompts the user for preferences on a variety of metrics, includi...
""" functions to optimize the transfers for N weeks ahead """ import os import sys import random from datetime import datetime from .utils import * from .schema import TransferSuggestion, PlayerPrediction from .team import Team, TOTAL_PER_POSITION from .player import CandidatePlayer positions = ["FWD", "MID", "DEF"...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ================================================== # @Time : 2019-06-20 22:31 # @Author : ryuchen # @File : config.py # @Desc : # ================================================== import os import logging import configparser from lib.defines.types import Int, Boolean, S...
import sys from multiprocessing import cpu_count from typing import Callable, Tuple import numpy as np import sharedmem from fastdist import fastdist from ripser import ripser from sklearn.metrics import euclidean_distances from tqdm.auto import tqdm sys.path.append("..") from approx_nn import ApproxNN # noqa: E402 ...
# scripts for creation of jupyter interactive maps and functionality import os import functools import numpy as np import pandas as pd import ipyleaflet as leaf import ipywidgets as widgets from gdv_scripts import helpers from gdv_scripts import data ## EVENT HANDLERS ## # event handler for study area selection def cl...
import numpy as np import rowan as rn import matplotlib.pyplot as plt import matplotlib.ticker as plticker from mpl_toolkits import mplot3d import matplotlib.animation as animation from matplotlib.backends.backend_pdf import PdfPages from matplotlib.gridspec import SubplotSpec, GridSpec from uavDy import uav def crea...
#!/usr/bin/env python3 # pylint:disable=line-too-long """ The tool to check the availability or syntax of domains, IPv4 or URL. :: ██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗ ██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝ ██...
#!/usr/bin/env python # -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: © 2021 Massachusetts Institute of Technology. # SPDX-FileCopyrightText: © 2021 <NAME> <<EMAIL>> # NOTICE: authors should document their contributions in concisely in NOTICE # with details inline in source files...
# Copyright (c) 2013-2015, Schneider Electric Buildings AB # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, th...
#!/usr/bin/python # # Inverse Kinematics Classes # # Copyright 2017 University of Washington # Developed by <NAME> and <NAME> # BioRobotics Lab, University of Washington # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met...
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Name: _extd_ast_expr # Purpose: Extensions of AST subclasses used in expressions # # Author: <NAME> (<EMAIL>) # # Copyright: (c) 2018 ff. <NAME> # License: This program is part of a larger appl...
import copy, types, new try: set except NameError: from sets import Set as set # Python 2.3 fallback from utils import calculate_size, get_attr_value, landscape, format_date, memoize,\ BAND_WIDTH, BAND_HEIGHT, CROSS_COLS, CROSS_ROWS, cm, A4, black, TA_LEFT, TA_CENTER,\ TA_RIGHT from ex...
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = "<NAME>" __copyright__ = "Copyright 2017, LUH: IMR" __credits__ = ["<NAME>"] # __license__ = "" __version__ = "0.2" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "alpha" __package_name__ = "AVTcamera" __developer__ = __author__ ''' Based on AVT imp...
#!/usr/bin/env python3 """ This script extracts DWARF symbols from an ELF files and tries to reconstruct Hydras definitions from those symbols. :file: dwarf2hydra.py :date: 14/10/2019 :authors: - <NAME> <<EMAIL>> """ import re import os import sys import argparse from elftools.dwarf.compileunit import CompileUnit...
#!/usr/bin/env python3 """ This program does some actions that `manage` does not. Possible commands: deploy create a new ColDoc site set_site set the SITE create_fake_users creates some fake users, to interact with the Django site add_blob add a an empty blob to a d...
from datetime import datetime from datetime import timedelta import re import calendar import numpy as np import roxar_api_utils.ioutil from .profiles import Profiles from .keyword_check import is_rate from .profiles_interpolation import profiles_interpolation def read_ofm( file_name, d...
import sublime import sublime_plugin import os import socket import base64 import threading import types import json import webbrowser import subprocess import sys import time from xml.dom.minidom import parseString # This will turn on debug messages for the dubgger itself debugging_debugger = False moaidebug_curren...
#!/usr/bin/env python3 ## 16 Oct 2019 | EHU modifying BM's original code import sys,os import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.colors import LightSource, Normalize #from cpt_tools import cpt2python def main(datadic,skafta): data = Data(datadic,skafta) data.read_d...
import os import time import collections import datetime import logging import json from lxml import html, etree from StringIO import StringIO from lems_ui.models import LemsElement, LemsTypeTag from lems_ui.models import LemsModel, ParameterisedModel from lems_ui.models import Lems2FpgaJob, MODEL_TYPES, all_availabl...
import re import numpy as np import pandas as pd import random as rd from sklearn import preprocessing from sklearn.cluster import KMeans from sklearn.ensemble import RandomForestRegressor from sklearn.decomposition import PCA # Print options np.set_printoptions(precision=4, threshold=10000, linewidth=160, edgeitems=9...
#!/usr/bin/env python # coding: utf-8 # # Project Statement # The Film Junky Union, a new edgy community for classic movie enthusiasts, is developing a system for filtering and categorizing movie reviews. The goal is to train a model to automatically detect negative reviews. You'll be using a dataset of IMBD movie re...
#!/usr/bin/env python # # orthopanel.py - The OrthoPanel class. # # Author: <NAME> <<EMAIL>> # """This module provides the :class:`OrthoPanel` class, which displays a 2D view of 3D overlays. A couple of other classes are provided for convenience: .. autosummary:: :nosignatures: OrthoFrame OrthoDialog """ ...
import numpy as np from gym import Env, spaces from gym.utils import seeding import sys from six import StringIO, b import copy from gym import utils from gym.envs.toy_text import discrete from scipy.misc import imresize RENDER_DIR = 'renderings/' LEFT = 0 DOWN = 1 RIGHT = 2 UP = 3 ACTIONS = [(-1, 0), (0, 1), (1, 0...
# _____ ______ _____ # / ____/ /\ | ____ | __ \ # | | / \ | |__ | |__) | Caer - Modern Computer Vision # | | / /\ \ | __| | _ / Languages: Python, C, C++, Cuda # | |___ / ____ \ | |____ | | \ \ http://github.com/jasmcaus/caer # \_____\/_/ \_ \______ |_| \_\ # Lice...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import copy from simulador import Event, Model, Simulation # from GUI import setPrint, run from mensaje import Mensaje, mensaje import tkinter as tk # <NAME> # class Algorithm2(Model): def init(self): self.lider = self.id...
from importlib import import_module import json from multiprocessing.dummy import Array import os import re import requests import time from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import TimeoutException from dateutil import parser from ur...
#!/usr/bin/env python3 import sys import os from types import SimpleNamespace sys.path.append(os.getcwd()) import os.path as osp import argparse import json import random from collections import OrderedDict, defaultdict import socket import getpass import torch import numpy as np from config import CLASS_NUM, IMAGE...
""" # The Lattice Boltzmann Method - stress and force This notebook uses the Lattice Boltzmann (LBM) Method for numerical simulation of fluid flow to calculate the flow around a sphere. Written in python and jax. This code will focus on the stress tensor and force acting on the sphere. The stress tensor will be det...
# -*- coding: utf-8 -*- """This file contains functions which can be used to model the behavior of flocs based on the chemical interactions of clay, coagulant, and humic acid. """ ######################### Imports ######################### import numpy as np from aide_design import utility as ut from aide_design.unit...
import numpy as np from numpy import pi as pi64 from jax import numpy as jnp from jax.config import config config.update('jax_enable_x64', True) __all__ = [ 'thermal_phase_curve', 'reflected_phase_curve', 'reflected_phase_curve_inhomogeneous' ] floatX = 'float32' pi = np.cast[floatX](pi64) h = np.cast[fl...
import pandas as pd from wordcloud import WordCloud import re from time import time import matplotlib.pyplot as plt import seaborn as sns from datetime import datetime from dateutil.parser import parse import numpy as np from bokeh.palettes import plasma from bokeh.plotting import figure, show from bokeh.embed import ...
#! /usr/bin/env python # -*- coding: utf-8 -*- #################### import indigo # Added here to stop pylint errors # import inspect # Not needed once we convert logging to use format import json import logging from os import path import pdb from Queue import Queue import socket from tpl_polling import pollingT...
import logging from collections import defaultdict import dataclasses import numpy as np import pandas as pd from scipy import stats from statsmodels.stats.contingency_tables import Table2x2 from sklearn.cluster import DBSCAN import pomegranate as pm from .io import load_model_priors logger = logging.getLogger('yan...
import torch import torch.nn as nn import bcolz import numpy as np import math import warnings from typing import Optional import torch.multiprocessing as mp """ ASR model parts """ class LayerNorm(nn.Module): def __init__(self, n_features): super(LayerNorm, self).__init__() self.layer_norm =...
import tkinter as tk from tkinter import * import cv2 import csv import os import numpy as np from PIL import Image,ImageTk import pandas as pd import datetime import time import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg ####GUI for manually fill attendance def manually_...
import datetime import sys import networkx as nx import numpy as np import pandas as pd # Importing the module, not anything in it, to avid a circular import import powersimdata.input.grid as _grid from powersimdata.network.model import ModelImmutables def check_grid(grid): """Check whether an object is an inte...
from config import paths import re import sys import os import tokens import numpy as np TOKEN_SPECIFICATION = {} # (token id, regex) # 0: TokenInfo('root', 1, 0, '\\sqrt{{{}}}'), TOKEN_SPECIFICATION[0] = r'sqrt' # 1: TokenInfo('fac', 1, 1, '{}!'), TOKEN_SPECIFICATION[1] = r'!' # 2: TokenInfo('max', 1, 2, 'max {}...
import pya import os from utils import * from netlist import * class Module: '''Module class represents a physical device with two represetitives as Module.cell = layout representation and Module.netlist as a netlist ''' pin_map = {} placement = "core" cells_in_cell = 1 """docstring for ClassName""" def __i...
# ****数据预处理代码-第一步:数据清洗**** # import pandas as pd import numpy as np import random from collections import Counter from sklearn import preprocessing from matplotlib import pyplot as plt import seaborn as sns import missingno from scipy import stats import math # 绘图预处理 plt.rcParams['font.sans-serif'] = ['...
# Copyright 2018 Stanford University # # 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 writi...
from neuro_series import * from peristimulus import * from abc import abstractmethod import logging logging.basicConfig(level=logging.INFO) #sns.set_context("talk") RAND_STATE = 230 ################################################## ##################### NBMat ###################### ##################################...
#!/usr/bin/env python # ================================================================ # Python Script - Analysis - Generate ML Features # # It loads the "RNA Lib Structure Summary" file (in JSON) as well as the "bpRNA" info and generate the # ML features based on given platform. # # ## Input # - RNA Lib Structure...
"""Code for parameter and function fitting of risk based approximate model to simulation data.""" import pdb import copy import itertools import os import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable from scipy.optimize import minimize from sklearn.linear_model im...
#!/usr/bin/env python # -*- coding:utf8 -*- import netsnmp class SNMPInspector(): #CPU OIDs _cpu_1_min_load_oid = "1.3.6.1.4.1.2021.10.1.3.1" _cpu_5_min_load_oid = "1.3.6.1.4.1.2021.10.1.3.2" _cpu_15_min_load_oid = "1.3.6.1.4.1.2021.10.1.3.3" #Memory OIDs _memory_total_oid = "1.3.6.1.4.1.2021...
# -*- coding: utf-8 -*- """ GripIt - UCF, Edge Base Gripper Implementation """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from builtins import super from builtins import range from builtins import int from builtins...