text
stringlengths
3.07k
22.1k
import os # for converting the frames into bytes import cv2 # and for processing arrays import numpy as np # for encoding and decoding Custom Vision predictions import json # for converting the Custom Vision predictions to dataframe import pandas as pd # import async packages import asyncio import aiohttp...
import armor_stand_geo_class_2 as asgc import armor_stand_class import structure_reader import animation_class import render_controller_class as rcc import manifest from shutil import copyfile import os from zipfile import ZipFile import glob import shutil import ntpath import json import updater debug=False with open...
# Copyright 2016 NTT DATA # # 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...
from __future__ import annotations import re from abc import ABC, abstractmethod from collections import defaultdict from dataclasses import dataclass, field from datetime import datetime, timedelta from decimal import Decimal from enum import Enum, auto, unique from itertools import chain from typing import Callable,...
import matplotlib.pyplot as plt from scipy.ndimage import convolve import numpy as np def da_alone(a, dt, k): """ Computes the change of concentration given an initial concentration `a`, a time increment `dt` and a constant `k`. Note that there is no `i` in the equation since it is supposed to be `a` a...
import os import re import subprocess as sp from shutil import copyfile from time import sleep import pytest import genomepy.utils from genomepy.plugins import activate, deactivate, get_active_plugins, init_plugins from genomepy.plugins.blacklist import BlacklistPlugin from genomepy.plugins.bowtie2 import Bowtie2Plug...
import base64 import logging from pathlib import Path from requests.models import Response from typing import NamedTuple, Tuple from urllib.parse import unquote # noinspection PyPep8Naming import xml.etree.ElementTree as ET __all__ = ["Header", "Merchant", "Buyer", "Item", "Disbursement", "SzamlazzResponse", "PdfData...
# -*- coding: utf-8 -*- # Copyright 2020 <NAME> (@dathudeptrai) # # 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 appli...
#!/usr/bin/env/python3 """ Traceroute Python implementation almost from scratch. Before the script is run, the following constant have to be set: INTERFACE, SRC_IP, DEST_IP, SRC_MAC UDP Header according to RFC 768 : 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ | Source ...
import sqlite3, sys, datetime, csv from datetime import date use_levenshtein = False try: import Levenshtein use_levenshtein = True except: pass def create_schema(conn): with conn: conn.execute('''CREATE TABLE game (id integer primary key autoincrement, title text, rele...
"""train and inference with baseline models: KNN, SVM""" import argparse import string import os import cv2 import imutils import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.svm import SVC from sklearn.neighbors import KNeighborsClassifier from sklearn.neural_network import MLPClassifi...
from scipy.stats import hypergeom from scipy.stats import fisher_exact import numpy as np import uniprot import go class GO_ORA_analyser(): def __init__(self, goOntologyFile, proteomeDirectory, experimentalProteinDirectory): print("Loading ontology") go.setOntology(goOntologyFile) print("R...
"""empty message Revision ID: ed<PASSWORD> Revises: Create Date: 2020-07-18 19:34:50.950191 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'edf<PASSWORD>' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gen...
""" js2esi.token ply.lex token definitions for js-to-esi compilation """ import re import sys __author__ = "<NAME>, <NAME>" __copyright__ = "Copyright 2017, Akamai Technologies" __license__ = "Apache2" class UnicodeNotSupported(Exception): pass class BadEscapeSequence(Exception): pass # reserved words reserved...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2012 <NAME> (<EMAIL>) # # This program 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...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from PyQt5.QtWidgets import QWidget, QApplication, QVBoxLayout, QPushButton from PyQt5.QtCore import Qt def log_uncaught_exceptions(ex_cls, ex, tb): text = '{}: {}:\n'.format(ex_cls.__name__, ex) import traceback text += ''.join(tra...
import xlrd from bs4 import BeautifulSoup import requests import time import datetime import json import re import xlsxwriter import os from docx import Document from docx.shared import Inches cook='UM_distinctid=16822772df50-0cca678828aea6-b353461-100200-16822772e8fd5; CNZZDATA5626149=cnzz_eid%3D5692271...
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function from __future__ import division import os import shutil import math import time from functools import reduce import operator import torch import torch.nn as nn import torch.nn.functional as F from tor...
""" This program was written using Anaconda release 2021.05 with python version 3.8 and the IDE is Spyder 4.2.5 ______ The main program structure was maintained, but slightly modified to fit the flow of data and achieve better readability. ______ Modification no. 1 as per requested """ import time import pandas as pd ...
import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from torch.optim import Adam import numpy as np import datasets, networks, utils, loss, kernels, options import os import sys import time import tqdm def train(loader, model, optimizer, criterion, epoch, d1, ...
import os import shlex import subprocess import time import numpy from . import runtime_info, debug, api_communicator import re def get(workload_manager): if workload_manager == 'slurm': return Slurm else: err_msg = "Unknown workload manager: {}".format(workload_manager) debug.log(er...
import datetime import decimal import json from typing import Dict, List from funds.models import Fund, Operation, Investor from funds.models import ValuesToWithdraw, InvestorsSnapshot, Investors from funds.services import prices from funds.services.exceptions import IllegalStateException from funds.services.funds imp...
""" Cog for the on_raw_message_delete event. Logs from this event include: When a message is deleted (message_delete) Part of the Gabby Gums Discord Logger. """ import logging from typing import TYPE_CHECKING, Optional, Dict, List, Union, Tuple, NamedTuple import aiohttp import discord from discord.ext import co...
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Hewlett Packard Enterprise Development LP # # 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...
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
import unittest import numpy as np from numpy.testing import assert_allclose, assert_array_equal from tests.utils import random_spd class Test_LinearDynamics(unittest.TestCase): def test_predict(self): from donk.dynamics import LinearDynamics dynamics = LinearDynamics( F=np.array([...
""" Copyright 2022 Google LLC 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 writing, software di...
import os import glob import rasterio import numpy as np import pandas as pd from tqdm import tqdm import torch.utils.data as data # standar S2_MEAN = np.array([1353.3418, 1265.4015, 1269.009, 1976.1317]) S2_STD = np.array([242.07303, 290.84450, 402.9476, 516.77480]) def normalize_S2(imgs): for i ...
#!/usr/bin/python3 import time import os import random import numpy as np def CountMoney(): with open('money.txt', 'r') as f: money = float(f.readline()) return money def SaveMoney(Money): with open('money.txt', 'w') as f: f.write(str(Money)) def MountFullTrack(Positions, TrackS...
""" The dataset API for the CVPPP dataset Expected dataset format: . Should contain 2 folders "train" and "crossVal". \ Each should contain images "plant<num>_rgb.png" and "plant<num>_label.png" DataDir train plant<num>_rgb_.png plant<num>_label.png plant000_rgb_.pn...
import logging import mimetypes from datetime import datetime from urllib.parse import urljoin, urlparse from lxml import html from gssutils.metadata.dcat import Distribution from gssutils.metadata.mimetype import ODS, PDF from gssutils.metadata.pmdcat import Dataset def content_api(scraper, tree): final_url = ...
# -*- coding: utf-8 -*- """ Created on Fri May 26 19:03:35 2017 @author: azunre """ import pandas as pd import azure_utils.client as client import graphutils.printSample as printSample import graphutils.getConnection as gc import graphutils.insertColumnDatasetJoin as insert import pandas import sys import random impor...
import torch import torch.nn as nn import numpy as np def get_activation(name, inplace=True): if name == 'relu': return nn.ReLU(inplace) if name == 'lrelu': return nn.LeakyReLU(0.2, inplace=inplace) if name == 'tanh': return nn.Tanh() def get_normalization(name, channels): if name == 'in': return nn....
import coloredlogs import io import matplotlib.pyplot as pp import math import multiprocessing as mp import numpy as np import os import tensorflow as tf import scipy.stats import random import logging from os.path import splitext, basename from time import strftime, gmtime ###################################### # Lo...
# Copyright (c) 2009-2021 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. """Angle potentials.""" from hoomd import _hoomd from hoomd.md import _md from hoomd.md import force from hoomd.md.force import Force from hoomd.data.typeparam imp...
"""Recorded Future Identity Integration for Demisto.""" from typing import Dict, Any, List, Union, Optional import requests import json import re import dateparser # flake8: noqa: F402,F405 lgtm import demistomock as demisto from CommonServerPython import * STATUS_TO_RETRY = [500, 501, 502, 503, 504] LIMIT_IDENTITIES...
import argparse import math from mAP import * from scipy.stats import rankdata parser = argparse.ArgumentParser(description='Reformat predictions and combine augmentations') parser.add_argument('--dataset', default='test', type=str) parser.add_argument('--augment', default='default', type=str) parser.add_arg...
from __future__ import division __all__ = ['get_resource_path', 'discrete_inverse_logit', '_sig_stars', '_robust_estimator', '_chunk_boot_ols_coefs', '_chunk_perm_ols', '_ols', '_perm_find', 'isPSD', 'nearestPSD'] __aut...
#!/usr/bin/env python from __future__ import print_function import json import logging from .taxon_concept_node import TaxonConceptSemNode from .verbatim_name import VerbatimSemNode from .names_for_ranks import (GenusGroupSemNode, HigherGroupSemNode, Specimen...
# -*- coding: utf-8 -*- """This module defines commonly used pieces for widgets""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from logging import getLogger from math import sqrt from builtins import str from collec...
import random import logging logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) handler = logging.StreamHandler() handler.setLevel(logging.CRITICAL) formatter = logging.Formatter( '%(asctime)s - %(name)s - %(levelname)s - %(message)s' ) handler.setFormatter(formatter) logger.addHandler(handler)...
""" Sprite Explosion Simple program to show creating explosions with particles Artwork from http://kenney.nl If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.sprite_explosion_particles """ import random import math import arcade SPRITE_SCALING_PLAYER ...
""" Interface between the TensorFlow Agents framework and the Robotini racing environment. Allows TensorFlow agents to interact with the race car. """ import logging import time import json from redis import Redis import numpy as np from tf_agents.environments import py_environment from tf_agents.environments import t...
from builtins import zip import itertools import numpy as np import pytest import moldesign as mdt from moldesign import units as u from .molecule_fixtures import * from .object_fixtures import * __PYTEST_MARK__ = 'internal' # mark all tests in this module with this label (see ./conftest.py) def test_carbon_cop...
import imgaug from imgaug import augmenters from researches.ocr.task3.t3_util import * import torch month = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"] price_char = set(['0', 'R', '1', '3', ' ', '7', '.', '5', 'M', '2', ',', '8', '-', '4', '6', '$', '9']) def is_date(...
""" Impedance models, data-structures, and calculations. .. moduleauthor:: whileman133 """ from abc import ABC, abstractmethod from typing import Union, cast import math import numpy as np class Z(ABC): """Abstract representation of an impedance element.""" @property @abstractmethod def prefix(sel...
""" mmvt_sim_namd.py Base objects and routines for preparing NAMD simulations to run for MMVT calculations. """ import os import datetime import parmed import seekr2.modules.common_sim_namd as common_sim_namd from seekr2.modules.common_sim_namd import add_string_buffer dt_date = datetime.datetime.now() SEEKR_MMVT_...
""" SORT: A Simple, Online and Realtime Tracker Copyright (C) 2016 <NAME> <EMAIL> This program 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 o...
from . import * # noqa from ..app import app import pandas as pd import datetime import json def seed_codebook_data(db): df = pd.read_excel('%s/data/%s' % (app.root_path, "codebook-data/sacn_socr_variables_20200817_scoda.xlsx")). \ fillna(value='') for data in df["region_name"].unique(): if ...
#!/usr/bin/python3 """ Use directional lighting and ambient lighting to implement a primitive lighting model. The model is loaded from a wavefront obj that was created with Blender. """ import sys import os.path sys.path.append('/'.join(os.path.dirname(os.path.abspath(__file__)).split('/')[:-1])) from genericgl imp...
"""pinterest-board-downloader Download pinterest boards. """ import argparse import json import os import sys import lxml.html as html import requests def print_progress_bar( iteration, total, prefix='', suffix='', decimals=1, length=100, fill='#'): """Print iterations progress. Call in a l...
import math import numbers import numpy as np import pandas as pd import lmfit as lm from scipy.spatial.transform import Rotation import scipy.optimize as optimize import pypdt from .conversions import one_gev_c2_to_kg, one_kgm_s_to_mev_c, q_factor from scipy.constants import c cbar = c / 1.e9 cmmns = c / 1.e6 m_e = ...
import requests import pandas as pd import json from datetime import datetime from jellyfish import jaro_distance import matplotlib.pyplot as plt """ Politeia Client Class Politeia Client automates interaction with the politeiawww API It has methods to get comments, proposals and users. """ class PoliteiaClient: ...
# Copyright (c) 2020, # ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, # Laboratoire de Traitement des Signaux 4 (LTS4). # All rights reserved. # # 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 th...
import datetime as dt # avoid namespace conflict over 'date' import os import typing from datetime import datetime, timedelta from pathlib import Path from typing import List, Optional import jinja2 import pandas as pd from attr import field from dateutil.easter import easter from docx import Document from docxtpl im...
# code inspired and modified from # https://github.com/thecountoftuscany/PyTeapot-Quaternion-Euler-cube-rotation import pygame import math from OpenGL.GL import * from OpenGL.GLU import * from pygame.locals import * from rclpy.node import Node import rclpy from sensor_msgs.msg import Imu """ PyTeapot module for drawing...
import pandapower as pp import numpy as np from pandapower.networks import create_synthetic_voltage_control_lv_network as mknet def get_net(config): """Given the configuration, call a function to create the network object.""" if 'Six_Bus' in config.env_name: return six_bus(config.vn_high, config.vn_lo...
from datetime import datetime from typing import Dict from typing import List from typing import Tuple from typing import Optional from bot.models.settings import Settings from bot.models.day_off import DayOff from bot.utilities.api.helpers.classes import style_raw_student_class from bot.utilities.api.helpers.classe...
from __future__ import division,print_function,absolute_import import numpy as np import scipy.linalg as la # Convention for image arrays # [nPixel,nBand] # [nRow,nSample,nBand] def imqim(Q,im): ''' Compute x.T * Q * x, for every vector x in im; Assume im is 2d array, with vectors x being rows of im ...
import numpy, pandas, torch from sklearn import metrics import torch from torch.utils.data import Dataset, DataLoader # , RandomSampler, SequentialSampler from transformers import AutoTokenizer, AutoModel # Sections of config # Defining some key variables that will be used later on in the training MAX_LEN =...
import datetime import pytz import unittest2 from gcloud import datastore # This assumes the command is being run via tox hence the # repository root is the current directory. from regression import populate_datastore from regression import regression_utils class TestDatastore(unittest2.TestCase): @classmethod ...
from git import Repo import wget import os import shutil import glob import generate_permutations import setup_deschaintre import zipfile from pytorch_ssim import ssim import numpy as np import matplotlib.pyplot as plt # Global variables that can be changed to organize directory structure. # Important to have test dir...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019-2021 The Polypheny 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 #...
""" https://github.com/numpy/numpy/blob/v1.19.0/numpy/lib/histograms.py Histogram-related functions """ import functools import operator import warnings import numpy as np from numpy.core import overrides array_function_dispatch = functools.partial( overrides.array_function_dispatch, module='numpy') # range is a...
# -*- coding: utf-8 -*- import requests, bs4, re, csv, time, os, cchardet, lxml from threading import Thread import concurrent.futures from print_handler import print_func def telegram_parser_open(): try: channel_db = open('output/channels.csv', 'a', newline='', encoding="utf-8") group_db = open(...
# -*- coding: utf-8 -*- """ Created on Sat Aug 27 23:38:17 2016 @author: notesofdabbler """ import pandas as pd import sys from flask import Flask, render_template, url_for, request, redirect app = Flask(__name__) global descsrch, keywdsrch, keywdsrchexcl,lvlpick descsrch = '' keywdsrch = '' keywdexcl = '' ...
import torch import torch.nn.functional as F from .utils import ensure_dimensions # Inversion helper functions def _tensor_min(*args): """Elementwise minimum of a sequence of tensors""" minimum, *rest = args for arg in rest: minimum = minimum.min(arg) return minimum def _tensor_max(*args):...
import pytest from pytsql.tsql import _split from .helpers import assert_strings_equal_disregarding_whitespace def test_ignore_go_inside_quoted_text(): seed = """DECLARE @td VARCHAR(20) = CONVERT(VARCHAR, GETDATE(), 112); DECLARE @dynamic VARCHAR(8000) = ' CREATE DATABASE ' + @database_name +...
#!/usr/bin/env python """ \example xt_modules_plot_record_playback_radar_raw_data_message_3D.py Latest examples is located at https://github.com/xethru/XeThru_ModuleConnector_Examples or https://dev.azure.com/xethru/XeThruApps/_git/XeThru_ModuleConnector_Examples. # Target module: # X4M200 # X4M300 # X4M03(XEP) # In...
from typing import Any, Dict, Iterable, Optional, Sequence, Tuple, Union import torch from torch.nn.functional import mse_loss import pystiche import pystiche.ops.functional as F from pystiche import enc, loss, ops from pystiche.image import transforms from ._utils import extract_normalized_patches2d from ._utils im...
import numpy as np import torch import torchvision import torchvision.transforms as transforms import torch.nn.functional as F from mnist import MNIST # Highest accuracy achieved: 99.52 at 45 epochs% # input 1x784 (28x28) image device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') class CombinerNN(...
import glob import os import numpy as np import cv2 from scipy.io import loadmat import torch from torchvision import transforms from PIL import Image PATH_SALICON_17 = "/data/Datasets/LSUN17" PATH_SALICON_16 = "/media/eva/WD8T/Datasets/LSUN16" PATH_IMAGES = "/media/eva/WD8T/Datasets/LSUN17/images" def parse_fixatio...
from .base_network import * from .operator import * import torch import itertools import torch.nn.functional as F import numpy as np from IPython import embed # Policy network for ST2 class GridWorldSynPo(nn.Module, ValueNet): def __init__(self, in_channels, n_actions, arg_dim, embed_dim, scene_num, task_num, \ ...
#!/usr/bin/env python import argparse import datetime import json import os import re import requests import yaml from prettytable import PrettyTable from prettytable import PLAIN_COLUMNS def getDroneBuildsParser(): parser = argparse.ArgumentParser(description='Drone builds') parser.add_argument('-a', '--ac...
from django.shortcuts import render, redirect from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from .forms import HoraForm from .models import Hora import datetime from datetime import date import locale locale.setlocale(locale.LC_ALL,'es_CL.UTF-8') # Create your v...
""" DISCRIMINATOR FOR BINARY CROSS ENTROPY (LABELED IMAGES) """ # Libraries # Standard library import json import random import time import numpy as np import matplotlib.pyplot as plt from typing import Dict, List, Tuple def load(filename): """Load a neural network from the file ``filename``. Returns an insta...
# MIT License # Copyright (c) 2019 <NAME> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish...
from .utils import get_now, timedelta_total_seconds import datetime class Dimension(object): """Dimensions are used for grouping sets of metrics by shared components. They are key-value string pairs which are meant to be indexed in the metrics storage for ease of querying metrics. :type name: string ...
# -*- coding: utf-8 -*- import json import multiprocessing import random from queue import Empty from functools import reduce import enlighten import time import numpy as np import warnings import yaml from .metaheuristic import Metaheuristic from .utils import InvalidPipeline class Individual: """Representa u...
# from __future__ import print_function from time import gmtime, strftime from MicroExpNet import * from PIL import Image, ImageOps import tensorflow as tf import numpy as np import cv2 import imagezmq import sys import os from picamera.array import PiRGBArray from picamera import PiCamera import time import matplotl...
#!/bin/python # # This data is from <NAME>'s synthetic library of Cas13 crRNAs # tested using CARMEN/Cas13. # This is for the fisrt experiment we did (Spring, 2019): CCF005. # Amount of target sequence context to extract for each guide CONTEXT_NT = 20 from collections import defaultdict import csv import gzip impor...
''' This submodule contains the scripts that the we used to run VASP. Note that some of these scripts were taken and modified from [GASpy](https://github.com/ulissigroup/GASpy) with permission of authors. ''' __author__ = '<NAME>' __email__ = '<EMAIL>' import os import numpy as np import ase.io from ase.io.trajector...
from sqlalchemy import create_engine from datetime import datetime from ast import literal_eval from cook import Archiver import streamlit as st import json import boto3 import os conn = create_engine(os.environ.get("RECIPE_ENGINE")) archiver = Archiver( engine=os.environ["RECIPE_ENGINE"], ftp_prefix=os.enviro...
# coding:utf-8 import copy import glob import math import os import shutil import random as rnd import matplotlib.pyplot as plt from PIL import Image import wandb rnd.seed(1124) os.environ['WANDB_MODE'] = 'dryrun' hyperparameter_defaults = dict( pop_num=200, # 個体数 -> [100, 300] tournament_s...
import lxml.etree as ET from .models import SkosConcept, SkosConceptScheme, SkosLabel class SkosReader(object): """ reads a skos file (RDF/XML) and returns a list of dictionaries containing rdf:Description properties concept-id: (URL) notation: (derived from concept-id) pref_labels: (list of ...
import bpy import json def add_object(name, verts, faces, edges=[], col_name='Video_col.1'): ''' Добавление пользовательского объекта ''' mesh = bpy.data.meshes.new(name) obj = bpy.data.objects.new(mesh.name, mesh) col = bpy.data.collections.get(col_name) col.objects.link(obj) #bpy.cont...
import pandas as pd import warnings import numpy as np from matplotlib import pyplot as plt warnings.simplefilter("ignore") pd.set_option('display.max_columns', None) pd.set_option('display.max_rows', None) online = False # if True: download xml files from github URL # be careful: online version will not work if req...
#!/usr/bin/env python """ This script will subscribe to pxgrid and publish all learned @IPs to StealthWatch Enterprise into groups having the corresponding SGT name. There is dynamic cache to avoid all pxgrid updates to be replicated to SWE. Additional rate limiting is available to take some load off the SWE API call...
import os,sys from pathlib import Path import numpy as np import pandas as pd import matplotlib.pyplot as plt import torch from torch import Tensor as ts from torch.utils.data import Dataset, DataLoader, random_split from torchvision import transforms, utils from skimage import io,transform from PIL import Image ''...
# coding=utf-8 # Copyright 2019 Google LLC. # # 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 ...
import pickle import os class Accumulator: ''' The Accumulator class accumulates numerical quantities. It keeps a list of Entry objects. ''' class Entry: ''' The Entry class keeps track of elementary data. ''' def __init__(self, total): self.gain = 0 self.total = total def ga...
"""Authors: <NAME>.""" from pandas import DataFrame, read_csv from pathlib import Path import numpy as np from typing import Dict, Iterable from nwb_conversion_tools.basedatainterface import BaseDataInterface from pynwb import NWBFile from pynwb.file import TimeIntervals from spikeextractors import SpikeGLXRecordingEx...
import functools import time from collections import deque from threading import Lock, current_thread, Condition, Timer, Thread from helpers.logger_utils import get_stdout_logger from receivers.udt_receiver import UDTReceiver, InterruptableUDTReceiver from senders.udt_sender import UDTSender, LossyUDTSender, Corruptin...
""" 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 i...
""" main.py - The entire project is contained in this python file """ import wave import numpy as np from scipy.signal import get_window from scipy.fft import rfft, fftfreq import sys import os import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Outp...
from death.post.inputgen_planJ import InputGenJ import pandas as pd from collections import Counter import tqdm import numpy as np import torch import torch.nn as nn from torch.utils.data import DataLoader from death.post.inputgen_planH import InputGenH, pad_collate def get_death_code_proportion(ig): index_list=[]...
import numpy as np import torch from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.animation import FuncAnimation from matplotlib.lines import Line2D from matplotlib.animation import PillowWriter import RLlib plt.rcParams.update({ "font.family": "s...
from __future__ import print_function import time import os import sys import argparse import importlib import numpy as np from datetime import datetime BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = os.path.dirname(BASE_DIR) sys.path.append(BASE_DIR) sys.path.append(os.path.join(ROOT_DIR, 'models')) ...
import argparse import cv2 import torch import numpy as np from model import SCNN from model_ENET_SAD import ENet_SAD from model_SEENET_SAD import SEENet_SAD from utils.prob2lines import getLane from utils.prob2lines.lane_detection_funtions import roneld_lane_detection from utils.transforms import * import time from...
#!/usr/bin/env -S python -u import argparse import os import os.path import subprocess import tempfile def main(): args = parse_args() if args.subparser_name == "initialize": initialize(args) elif args.subparser_name == "release": release(args) elif args.subparser_name == "finalize": ...