text
stringlengths
8.04k
46.5k
"""Module for finding nearest imperfect match for HTTP request""" from abc import ABC, abstractmethod from base64 import b64encode from collections import namedtuple from collections.abc import Mapping, Sequence from difflib import SequenceMatcher from enum import IntEnum from heapq import heappush, heappop import ite...
# -*- coding: utf-8 -*- """ pyxform_validator_update - command to update XForm validators. """ from __future__ import print_function import argparse import fnmatch import io import json import logging import os import shutil import sys from datetime import datetime from stat import S_IXGRP, S_IXUSR from zipfile import...
""" This file runs all plots of the CEA """ from __future__ import division from __future__ import print_function import time import os import pandas as pd import numpy as np import networkx as nx import cea.config import cea.inputlocator from cea.plots.thermal_networks.loss_curve import loss_curve from cea.plots.t...
import dash import json import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output, State, ALL from dash_slicer import VolumeSlicer import dash_bootstrap_components as dbc import plotly.express as px import nibabel as nib import numpy as np from nilearn import im...
import torch import torch.nn as nn from torch.nn.parameter import Parameter import torch.nn.functional as F import re import unicodedata import itertools import time import numpy as np import tqdm import pickle from utils.DBconnector import DBConnection from nltk.corpus import stopwords # PAD_token = 0 # Used for pad...
"""The CarliniWagnerL2 attack """ # pylint: disable=missing-docstring import logging import numpy as np from numpy.lib.npyio import save import tensorflow as tf from utils import * from attacks.backdoor_generator import BackdoorGenerator import math as m from tqdm.gui import trange MAX_ITER = 5 def create_logger(na...
from __future__ import print_function import logging import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap from matplotlib.patches import Circle from matplotlib.lines import Line2D from matplotlib.gridspec import GridSpec from .plots import plot_cmaps, plot_colors log...
# -*- coding: utf-8 -*- import time from xml.etree import ElementTree import requests from plexapi import BASE_HEADERS, CONFIG, TIMEOUT, log, logfilter, utils from plexapi.base import PlexObject from plexapi.exceptions import BadRequest, NotFound, Unauthorized, Unsupported from plexapi.playqueue import PlayQueue from ...
import torch import numpy as np import copy from ..networks import CategoricalActorCriticNet, CategoricalActorCriticVAENet, GaussianActorCriticNet from ..networks import FCBody, LSTMBody, GRUBody, ConvolutionalBody, BetaVAEBody, resnet18Input64, ConvolutionalGruBody from ..networks import PreprocessFunction, ResizeCNN...
"""Freeze modules and regen related files (e.g. Python/frozen.c). See the notes at the top of Python/frozen.c for more info. """ from collections import namedtuple import hashlib import os import ntpath import posixpath import platform import subprocess import sys import textwrap import time from update_file import ...
import base64 import binascii import codecs import hashlib import hmac import io import json import re import struct import time import urllib.response import uuid from .common import InfoExtractor from ..aes import aes_ecb_decrypt from ..compat import compat_urllib_parse_urlparse, compat_urllib_request from ..utils i...
#!/usr/bin/python ################################################################# ################################################################# """ Name: <NAME> Student Number: 20236596 Mikes Github Repo: https://github.com/mickstarr/ARC Summary / Reflection: Histograms were handy for a number of tasks. ...
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. 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 re...
""" Tellurium utilities for working with COMBINE archives. Open Modeling EXchange format (OMEX) is the basis of the COMBINE Archive, a single file that supports the exchange of all the information necessary for a modeling and simulation experiment in biology. An OMEX file is a ZIP container that includes a manifest fi...
""" Random Phylogenetic Tree Generator. This script provides function to generate random phylogenetic trees in a Yule (birth only) or Birth-Death model, setting different generation parameters and limiting the tree in terms of number of leaves and/or evolution time. """ # Import Python standard libraries import math ...
import subprocess import shutil import datetime import yaml import warnings import opengen.config as og_cfg import opengen.definitions as og_dfn import casadi.casadi as cs import os import jinja2 import logging import pkg_resources import sys from .ros_builder import RosBuilder _AUTOGEN_COST_FNAME = 'auto_casadi_cos...
#!/usr/local/bin/python3.7 # -*- coding: utf-8 -*- """ Contains the supervising class for all NuvlaBox Engine components """ import docker import json import time import os import glob import OpenSSL import socket from datetime import datetime from system_manager.common.logging import logging from system_manager.comm...
############################################################################### # Name: lisp.py # # Purpose: Define Lisp syntax for highlighting and other features # # Author: <NAME> <<EMAIL>> # # Author: Jeff ...
#! /usr/bin/env python """ Module with S/N calculation functions. We strongly recommend users to read Mawet et al. (2014) before using routines of this module: https://ui.adsabs.harvard.edu/abs/2014ApJ...792...97M/abstract """ __author__ = '<NAME>, <NAME> @ ULg, <NAME>' __all__ = ['snr', 'snrmap', ...
# Anchor-based BEV detection head template. Mofidied from OpenPCDet. https://github.com/open-mmlab/OpenPCDet import numpy as np import torch import torch.distributed as dist import torch.nn as nn import copy from liga.utils import box_coder_utils, common_utils, loss_utils from liga.utils.common_utils import dist_redu...
import copy from ..tools import * from ..astTools import * from ..display import * from ..test import test as codetest from .diffAsts import * from ..State import * from ..ChangeVector import * from ..models import AnonState, CanonicalState def getNextId(states, idStart): count = 0 for s in states: if idStart in s...
#!/usr/bin/env python """Plot labelled read""" ######################################################################## # File: plot_labelled_read.py # executable: plot_labelled_read.py # # Author: <NAME> # History: Created 02/24/18 ######################################################################## from __futur...
""" Python Navigation Abstract Class @Author: <NAME> TODO: Comments + Sphynx Docs Structured Text TODO: Bug-fix, testing """ from abc import ABC from scipy import integrate from scipy.ndimage import interpolation from spatialmath.base.transforms2d import * from spatialmath.base.vectors import * from spatialmath impor...
# /bin/env python3 # -*- coding: utf-8 -*- # trace.py --- Data type for iterative algorithm # Copyright (C) 2020 <NAME> <<EMAIL>> # Everyone is permitted to copy and distribute verbatim or modified # copies of this license document, and changing it is allowed as long # as the name is changed. # DO WHAT TH...
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
import argparse from pathlib import Path import os from PIL import Image import math import numpy as np import random import pandas as pd import sys def check_args(dataset_folder, output_folder, split, split_test, nb_augmented_images): """ Description: This function checks that the command line arguments are v...
from operator import attrgetter import numpy as np from sklearn.neighbors import NearestNeighbors import copy class TreeNode: def __init__(self, id, x, y, z, children, father_id, thickness = 1): self.id = id self.x = x self.y = y self.z = z self.type = 1 self.thickn...
"""MathML printing tests.""" import pytest from diofant import (Basic, E, Eq, EulerGamma, Float, Ge, GoldenRatio, I, Integer, Integral, Limit, Lt, Matrix, Ne, Rational, Sum, Symbol, acos, acosh, asin, asinh, atan, atanh, cbrt, cos, cosh, diff, mathml, oo,...
"""<NAME>., 2019 - 2020. All rights reserved.""" import datetime import fnmatch import subprocess import os import re import sys import time import pandas as pd import extractor_log as cl LOG = cl.get_logger() DELTA_BODY = [] UID_LIST = [] FILE_TYPE = ["JAVA", "CPP", "C", "CS", "PY", "TS", "JS"] # pragma: no mutate...
"""Unidrive SP motor (<NAME>er) ================================== How to setup and control the motor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Pad, parameters and menus** The power drive has to be setup using its pad. There are arrow keys and two important buttons (a red button for reset, validate and stop the motor and...
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import numpy as np from scipy import integrate as ig from scipy.stats import beta from jams.kernel_regression import kernel_regression, kernel_regression_h __all__ = ['gap2lai', 'leafprojection'] def gap2lai(tgap, lgap, G, alpha, b...
from . import plot from . import select from . import utils from ._lazyload import matplotlib from scipy import sparse from scipy import stats from sklearn import metrics from sklearn import neighbors import joblib import numbers import numpy as np import pandas as pd import scipy.sparse import warnings plt = matplot...
import datetime, platform, json, logging, os, pymysql, traceback, ctypes, inspect, re,hashlib,socket,math from apps.common.helper.ApiReturn import ApiReturn from django.db import connection import apps.common.func.InitDjango from AutotestWebD.settings import * from django.forms.models import model_to_dict from apps.com...
# -*- coding: utf-8 -*- """ CommandLine: python -m dtool.example_depcache --exec-dummy_example_depcacahe --show python -m dtool.depcache_control --exec-make_graph --show """ from pathlib import Path from os.path import join import utool as ut import numpy as np import uuid from six.moves import zip from wbia....
# -*- coding: utf-8 -*- # pylint: disable-msg=W0621 """ Created on Tue Aug 5 12:16:27 2014 This module contains the definition of the abstraction pattern describing atrial fibrillation. @author: <NAME> """ import kardioml.segmentation.teijeiro.knowledge.observables as o import kardioml.segmentation.teijeiro.knowledg...
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as I import librosa from torch.autograd import Variable from utils.data_loader import SpectrogramParser import os import numpy as np import math from utils.audio import load_audio from utils import constant from models.common_layers...
"""Implement event handling for wydget GUIs. The `GUIEventDispatcher` class is automatically mixed into the `wydget.GUI` class and is activated by pushing the gui onto a window's event handlers stack:: gui = GUI(window) window.push_handlers(gui) Events ------ Standard pyglet events are passed through if ha...
#!/usr/bin/env python """ Copyright (c) 2014-2016, GhostBSD. 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. Redistribution's of source code must retain the above copyright notice, this list of co...
""" Spectral data representation. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from .core import Data from .atomic import get_atomdat from astropy.units import (erg, km, cm, s, angstrom, spectral, spectral_density, Quanti...
import os import json from datetime import date, datetime, timedelta import numpy as np import pandas as pd import plotly.graph_objects as go import pandas as pd from copy import copy from updateDB import ( getStockData, HandleDB, getLastValue, getStockName, getStockIntradayData, updateOHLC, getLastsValue, chec...
# -*- coding: utf-8 -*- """ Created on Mon Jul 16 12:00:00 2018 @author: <NAME> """ import pandas as pd import os import psycopg2 import networkx as nx import csv import itertools import operator import ast from sqlalchemy import create_engine import numpy as np import igraph as ig import copy from collections import ...
import datetime import pathlib import os import re import queue import threading import time from metaindex import indexer from metaindex import configuration from metaindex import sql from metaindex import stores from metaindex import shared from metaindex import logger from metaindex.query import Query, QueryVisitor...
# -*- coding: utf-8 -*- """Implements SRGAN models: https://arxiv.org/abs/1609.04802 TODO: """ import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import torchvision.models def swish(x): return x * torch.sigmoid(x) class FeatureExtractor(nn.Module): def ...
import os import pandas as pd import re import json from const import NlpConst, varies, stoplist ### Content # detect_lang # prep_sentence # PrepText def load_tokens(filepath="./Jobs Schema - tokens.tsv"): """ Load tokens for Extraction """ df_token = pd.DataFrame() tokenfile = filepath if os....
import base64 import contextlib import math import os.path import secrets import shutil import string import struct import tempfile import traceback import bgl import bpy import mathutils from ..common import gltf from .abstract_base_vrm_importer import AbstractBaseVrmImporter from .vrm_parser import ParseResult, rem...
#!/usr/bin/env python """ Penn Discourse Treebank 2.0 reader, requiring the PDTB file format used for the materials at http://compprag.christopherpotts.net/ """ __author__ = "<NAME>" __version__ = "2.0" __license__ = "GNU general public license, version 2" __maintainer__ = "<NAME>" __email__ = "See the author's websi...
#!/usr/bin/env python3 # Copyright (C) Alibaba Group Holding Limited. """ Functions that handle saving and loading of checkpoints. Modified from https://github.com/facebookresearch/SlowFast/blob/master/slowfast/utils/checkpoint.py. For the codes from the slowfast repo, the copy right belongs to Copyright (c) Facebook...
""" tn3270.emulator ~~~~~~~~~~~~~~~ """ from enum import Enum from itertools import chain import struct import logging from .datastream import Command, WCC, Order, AID, parse_outbound_message, \ format_inbound_read_buffer_message, \ format_inbound_read_modified_message,...
#! Como foi dado o paradmiga funcional no período, as telas também foram separadas assim. #! Porém, para uma boa organização do código, o mais viável seria por meio de classes e métodos(POO) import smtplib #!biblioteca que permite o python trabalhar com o protocolo SMTP import PySimpleGUI as tela #!bibl...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ######################################################################### # Copyright (c) 2015, UChicago Argonne, LLC. All rights reserved. # # # # Copyright 2015. UChicago Argonne, LLC. Th...
import sys import os from PyQt5 import QtCore from spectramanipulator import windows # from PyQt5.QtWidgets import * from PyQt5.QtCore import Qt, QCoreApplication from PyQt5.QtWidgets import QMessageBox, QMainWindow, QFileDialog, QWidget, QPushButton, QStatusBar, QLabel, \ QDockWidget, QApplication from PyQt5.QtG...
import math import random import copy import numpy as np import cv2 from mrcnn.visualize import display_images from mrcnn.dataset import Dataset # from mrcnn.shapes import ShapesConfig from mrcnn.datagen import load_image_gt, data_generator from mrcnn.visualize import draw_boxes from mrcnn.config import Conf...
# # Copyright (c) 2018 <NAME> <<EMAIL>> # # See the file LICENSE for your rights. # """ Methods for processing BUFR data. """ from mosx.util import generate_dates, get_array from collections import OrderedDict import re import os import pickle import numpy as np from datetime import datetime, timedelta from scipy imp...
from itertools import combinations import os import time import matplotlib.pyplot as plt import pandas as pd from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import * from sklearn.metrics import mean_squared_error def load_data(dataset): """ Helper function ...
from datetime import datetime from reportlab.lib.enums import TA_JUSTIFY, TA_CENTER from reportlab.lib.pagesizes import A4 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image, PageBreak from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm from r...
import numpy as np import matplotlib.pyplot as plt from astropy.io import ascii from astropy.io import fits from astropy.cosmology import FlatLambdaCDM from astropy.table import Table from scipy.optimize import curve_fit from astropy.constants import c, h, k_B from scipy.integrate import simps from astropy.coordinates ...
"""Returns Component from YAML syntax. name: myComponent vars: length: 3 info: description: just a demo polarization: TE ... instances: mzi: component: mzi_phase_shifter settings: delta_length: ${defaults.length} length_x: 50 pads: component: p...
################################################## # Copyright (c) <NAME> [GitHub D-X-Y], 2020 # ########################################################################################################################################### # # In this file, we aims to evaluate three kinds of channel searching strategies: ...
from scipy.stats import binom from scipy.sparse import csr_matrix, hstack from scipy.stats import ttest_ind_from_stats, mannwhitneyu from scipy.stats.distributions import norm from scipy.stats.mstats import rankdata from .utils import sparse_vars import numpy as np import sys def taylor_exp(x, n): # taylor series ...
from __future__ import print_function import argparse import itertools import logging import math import os import random from collections import OrderedDict import numpy as np import sklearn.utils as sku import torch import torch.backends.cudnn as cudnn import torch.legacy.nn as lnn import torch.nn as nn import tor...
""" Author: <NAME>. This code is written for the 3D-Human-Action-Recognition Project, started March 14 2014. """ from pathlib import Path import numpy as np def read_MSR(mainpath, input_all_n, class_all, set=0): ''' Read MSRAction3D datasets of 3D actions generate by Kinect type sensor. ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Manage the subtitle cache directory. ============== This the scheme for TV episodes: {showdir}/omdb-info.yaml # OMDbAPI.org info (DIFFERENT dir than Movies) {vid-dir}={show-dir}[/{season-dir}] # {show-dirs} has optional {season-dirs} {vid-dir}/{vid-corenm}.{vid...
# Unit tests for OOMAnalyser # # This software is covered by the MIT License. # # Copyright (c) 2021 <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, incl...
""" This module implements the visualization for the plot_diff function. """ # pylint: disable=too-many-lines from typing import Any, Dict, List, Tuple, Optional import math import numpy as np import pandas as pd from bokeh.models import ( HoverTool, Panel, FactorRange, ) from bokeh.plotting import Figure...
#!/usr/bin/env python from __future__ import print_function, division import tensorflow as tf print(f'Tensorflow version {tf.__version__}') from tensorflow import keras import tensorflow_addons as tfa import tensorflow_probability as tfp print(f'Tensorflow Probability version {tfp.__version__}') tfb = tfp.bijectors t...
# type: ignore """ test_patterns.py Tests for GreynirCorrect module Copyright (C) 2022 by <NAME>. This software is licensed under the MIT License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...
# -*- coding: utf-8 -*- """This module defines functions for parsing and writing `PDB files`_. .. _PDB files: http://www.wwpdb.org/documentation/format32/v3.2.html Derived from ProDy pdbfile.py but so as to use this version of AtomGroup """ from collections import defaultdict import os.path import numpy as np STR_...
import bisect import keyword import rope.base.simplify MINIMAL_LEN_FOR_AS = 5 def get_name_at(resource, offset): source_code = resource.read() word_finder = Worder(source_code) return word_finder.get_word_at(offset) class Worder(object): """A class for finding boundaries of words and expressions ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by imoyao at 2020/4/12 16:48 """ 将json中的数据转化名称由unicode转为汉字 名称转为拼音 """ import os import re from collections import defaultdict from functools import wraps, partial import itertools import json import yaml from pypinyin import lazy_pinyin, Style from backend.libs.z...
"""This module defines a declarative API for defining data models that are JSON-serializable and JSON-deserializable. """ import sys import dataclasses from enum import Enum from datetime import datetime, date import typing from webargs import fields from marshmallow import ( Schema, post_load, EXCLUDE, ...
# Picnic library script 'matplotlib_style.py' # Author: <NAME> # Written at Los Alamos National Laboratories # PCSRI Summer Program def init_plot(style=None,nrows=1,ncols=1,columnwidth=241.14749,textheight=626.0,textwidth=506.295,frac=(1.,1.),dpi=100,wspace=0,hspace=0,fontsize=9.,**figargs): print("Initializing th...
from nipype.interfaces.base import (BaseInterface, BaseInterfaceInputSpec, traits, File, TraitedSpec) import nibabel as nib import numpy as np from nipype.utils.filemanip import split_filename import os import matplotlib.pyplot as plot from sklearn.decomposition import PCA import su...
#_________________ # OLD def build_voters_profile(hs, qcx, K): '''This is too similar to assign_matches_vsmany right now''' cx2_nx = hs.tables.cx2_nx hs.ensure_matcher(match_type='vsmany', K=K) K += 1 cx2_desc = hs.feats.cx2_desc cx2_kpts = hs.feats.cx2_kpts cx2_rchip_size = hs.get_cx2_rch...
import argparse import os import sys import json import commentjson project_path = './' sys.path.insert(0, project_path + 'code') import envs.robosuite.robosuite as suite import numpy as np # ================================ stable_baseline algorithms ==================================== from stable_baselines import ...
import requests from bs4 import BeautifulSoup as bs from selenium import webdriver from fake_useragent import UserAgent from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import pandas as pd import numpy as np import re import os import pickle as pk from collections import deque import strin...
from enum import Enum from Bot.MergeDispatcher import CancelRequestStatus from Bot.MergeDispatcher import Dispatcher from Bot.MergeDispatcher import DoneRequestStatus from Bot.MergeDispatcher import FixRequestStatus from Bot.MergeDispatcher import KickRequestStatus from Bot.MergeDispatcher import MergeRequestStatus fr...
#importing all libraries import tkinter as tk import numpy as np import matplotlib import matplotlib.pyplot as plt matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.figure import Figure from tkinter import Tk, Canvas, Label, StringVar, OptionMenu, Entry, Button from...
""" Django settings for psono project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths ...
import numpy as np import trimesh from scipy.spatial.transform import Rotation as sciR class RigidMatrix(): def __init__(self, data): assert data.shape == (4,4) self._data = data @classmethod def fromRt(cls, R, t): M = np.zeros([4,4]) M[:3, :3] = R M[-1, :3] = t ...
# Copyright 2013 Big Switch Networks, 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...
from polymuse import constant from magenta.music import midi_io # from magenta.protobuf.music_pb2 import NoteSequence from magenta.protobuf import music_pb2 import numpy, copy, sys, traceback """ It includes the basic fuctionlity of input in and out, from midi to one of representation used in polymuse Hierarchy of R...
import logging import geopandas as gpd import numpy as np import pandas as pd from scipy.spatial import KDTree from delft3dfmpy.converters import hydamo_to_dflowfm from delft3dfmpy.core import checks from delft3dfmpy.datamodels.common import ExtendedGeoDataFrame from shapely.geometry import LineString, MultiPolygon, ...
# klabtools.py # helper functions to process ephys data # import os.path # import sys # import scipy.io import pandas as pd import numpy as np # import re import seaborn as sns from matplotlib import pyplot as plt from scipy.signal import butter, lfilter, filtfilt import ripple from mymap import Map def butter_ban...
#!/usr/bin/env python __author__ = "<NAME>" __copyright__ = "Copyright 2007-2012, The Cogent Project" __credits__ = ["<NAME>"] __license__ = "GPL" __version__ = "1.5.3" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Production" """This module contains functions for plotting distributions in various way...
# -*- coding: utf-8 -*- # Copyright 2017 IBM RESEARCH. 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 requ...
#!/usr/bin/env python """clashogram - Clash of Clans war moniting for telegram channels.""" import os import time import json import shelve import locale import gettext import hashlib import click import jdatetime import pytz import requests from dateutil.parser import parse as dateutil_parse gettext.bindtextdomain('...
# Copyright 2015 Google 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 by applicable law or a...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import torch import torch.nn as nn from torch.autograd import Variable import numpy as np import pdb import os import json from misc.bbox_transform import bbox_overlaps_batch import numbers i...
# -*- coding: utf-8 -*- """ Created on Tue Oct 1 11:29:41 2019 @author: DaniJ Note for my self: The aim of this script is to be extremely readable and well organized. From scratch? """ import numpy as np from scipy import linalg import scipy as sp from bvp import solve_bvp from scipy import linalg import matplot...
"""Training a GAN This file is part of a final year undergraduate project for generating discrete text sequences using generative adversarial networks (GANs) GNU GPL-3.0-or-later """ import argparse import csv import os import re import subprocess import sys import time from datetime import datetime import matplotl...
#!/usr/bin/env python """ picasso.localize ~~~~~~~~~~~~~~~~ Identify and localize fluorescent single molecules in a frame sequence :authors: <NAME>, <NAME>, 2016-2018 :copyright: Copyright (c) 2016-2018 Jungmann Lab, MPI of Biochemistry """ import numpy as _np import numba as _numba import multi...
# %% DEPS import matplotlib import numpy as np import pandas as pd matplotlib.use('Agg') import seaborn as sns # sns.set_palette("tab20") import matplotlib.pyplot as plt from src.tools.PairsIndex import PairsIndex from src.tools import cv_inds from src.visualization import plot_metrics from sklearn.pipeline import ...
import string import re from typing import List import urllib import mistune import bleach from itertools import count from flask import Markup from . import email_with_smart_quotes_regex from notifications_utils.sanitise_text import SanitiseSMS import smartypants LINK_STYLE = "word-wrap: break-word;" OBSCURE_WHITE...
# -*- coding: utf-8 -*- """ Created on Tue Mar 27 14:40:54 2018 @author: Santi """ import numpy as np from sklearn.model_selection import KFold import time class individuo: def __init__(self,_pesos,X_train,Y_train,X_test,Y_test): self.pesos = _pesos clasificador = clasificador1nn(X_...
import os, json, re, platform, time from internet_of_fish.modules.utils import file_utils from internet_of_fish.modules import definitions from internet_of_fish.modules.utils import gen_utils import datetime as dt from typing import Union, Callable from types import SimpleNamespace from internet_of_fish.modules.utils....
import time, datetime, os, pickle, psutil, json, string, random import numpy as np import copy as cp from contextlib import redirect_stdout from src.traffic_world import TrafficWorld from src.multiagent_mpc import load_state, save_state from src.warm_starts import generate_warm_starts from src.utils.ibr_argument_pars...
"""clubs module. Used for clubs data processes """ import pandas as pd import src.config as config import src.utilities as utilities from src.utilities import logging pd.set_option("display.max_columns", 50) # pd.set_option('display.expand_frame_repr', False) def func_score(x): """Map Goal diff to various fiel...
""" Contains the core parsing and indent functions of avwx """ # pylint: disable=redefined-builtin # stdlib import re import datetime as dt import math from calendar import monthrange from contextlib import suppress from copy import copy from typing import Any, Iterable, List, Optional, Tuple, Union # library from d...
''' Author: <NAME> Github: https://github.com/LeeWannacott/ ''' from cv2 import cv2 import numpy as np import math import easygui import sys import pyautogui ''' Speed up image selection, tagging and bounding boxing of relevant images to then use in machine learning models. 1. The program reads frames/images from a ...
import io from builtins import bytes, str from fro._implementation import chompers class Parser(object): """ An immutable parser. """ def __init__(self, chomper): self._chomper = chomper # public interface def parse(self, lines, loud=True): """ Parse an iterable co...