text
stringlengths
8.04k
46.5k
import random import GlobalConstants as GC import Engine, Image_Modification import CustomObjects # Mode types: # * Attack # * Attack2 - behind # Critical # Critical2 - behind # * Miss # * Dodge # * RangedDodge # * Stand # * RangedStand speed = 1 class Loop(object): def __init__(self, start):...
import re import warnings from contextlib import contextmanager from collections import deque, OrderedDict from lxml import etree from six import string_types as basestring, add_metaclass, text_type, PY3 from . import controlled_vocabulary from .controlled_vocabulary import obj_to_xsdtype from .validation import va...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import numpy as np import scipy as sp import datajoint as dj import matplotlib.pyplot as plt from scipy import signal from pipeline import experiment, tracking, ephys # ======== Define some useful variables ============== _side_cam = {'tracking_device': 'Camera 0'} _tracked_nose_features = [n for n in tracking.Tr...
"""Landlab component that simulates overland flow. This component simulates overland flow using the 2-D numerical model of shallow-water flow over topography using the de Almeida et al., 2012 algorithm for storage-cell inundation modeling. .. codeauthor:: <NAME> Examples -------- >>> import numpy as np >>> from land...
import numpy as np from numpy.linalg import inv from bokeh.models import ColumnDataSource class Structure: def __init__(self, masses, massSupports, trusses, trussLength, base): masslist = list() for i in range(len(masses)): masslist.append( ColumnDataSource(data=masses[i])...
from flask import Flask,render_template,request,redirect,url_for,session from Forms import CreateReviewForm,CreateCustomerForm, LoginCustomerForm, LoginAdminForm, UpdateCustomerForm from decimal import Decimal from Forms import Createproduct, Uploadimage import shelve, Review, Customer, os from Products import Products...
import numpy as np import os import urllib.request import gzip import tkinter as tk from PIL import Image, ImageDraw, ImageOps import idx2numpy """ Functions necessary to set up neural network for digit recognition and run associated GUI. Contents -------- NeuralNetwork: class Defines functions necessary to set...
#!/usr/bin/env python """ ############################### Software Package List Book View ############################### """ # -*- coding: utf-8 -*- # # rtk.software.ListBook.py is part of the RTK Project # # All rights reserved. # Copyright 2007 - 2017 <NAME> <EMAIL>rew.rowland <AT> reliaqual <DOT> com # # Red...
import sys import numpy as np from scipy.sparse import csc_matrix, csr_matrix import os from math import factorial from itertools import product from representability.config import DATA_DIRECTORY from openfermionpsi4 import run_psi4 from openfermion.hamiltonians import MolecularData from openfermion.transforms import ...
import tvm from tvm import te, topi,autotvm from tvm.topi import nn import tvm.testing from tvm import te import numpy import numpy as np import timeit from tvm.topi.mali import mali_winograd as tune_winograd from tvm.topi.testing import conv2d_nchw_python from tvm.contrib.utils import tempdir # The size of the matrix...
"""Flmanagermodules module.""" # -*- coding: utf-8 -*- from PyQt5 import QtWidgets, QtGui from pineboolib.core import decorators from pineboolib.core.utils import utils_base from pineboolib.core import settings from pineboolib.application.metadata import pnaction from pineboolib.application.staticloader import pnmod...
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http:# mozilla.org/MPL/2.0/. # # Author: <NAME> (<EMAIL>) # from __future__ import absolute_import, division, unicode_literals ...
# coding: utf-8 """ Name: train_with_constrain.py Desc: This script contains the training and testing code of Unwrap Film. Notations: ||rgb Mean: The original render image in color space. Shape: [batch_size, 3, 256, 256] Range: 0 ~ 255 -----> -1 ~ 1 ||threeD_map : Mean: Three coo...
"""This module contains the Explorer class, which is an abstraction for batched, Bayesian optimization.""" from collections import deque import csv import heapq import json from operator import itemgetter from pathlib import Path import pickle import tempfile from typing import Dict, List, Optional, Tuple, TypeVar, Uni...
# -*- coding: utf-8 -*- # MIT License # # Copyright 2018-2021 New York University <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 t...
"""Note: Keep in sync with changes to VTracePolicyGraph.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import gym import copy import ray from ray.rllib.utils.error import UnsupportedSpaceException from ray.rl...
import os import torch import torchvision import torch.nn as nn from PIL import Image from scipy import stats import random import numpy as np import time import scipy.io from torch.optim import lr_scheduler import torch.nn.functional as F def pil_loader(path): # open path as file to avoid ResourceWarning (https:/...
#!/usr/bin/env python # vim: set syntax=python et ts=4 sw=4 sts=4: """ This is a script to help in installing and setting up the devlab executable """ import argparse import distutils.spawn import json import logging import os import platform import re import shutil import ssl import subprocess import sys import tarfi...
#!/usr/bin/env python import urllib.request import json import os from urllib.request import Request, urlopen from flask import Flask from flask import request from flask import make_response # Flask app should start in global layout app = Flask(__name__) @app.route('/webhook', methods=['POST']) def webhook(): ...
# Copied from semi-supervised.ipynb notebook import argparse import json import os import time import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch import tqdm from sklearn.metrics import r2_score from sklearn.model_selection import KFold, GroupKFold from EVE.VAE_model import VAE_model ...
#!/usr/bin/env python """ _PhEDExInjectorPoller_ This component handles the WMAgent interactions with PhEDEx, which falls into 4 categories - injecting files - closing blocks - making subscriptions - deleting blocks (for copy+delete subscriptions) Making subscriptions and deleting blocks is optional, triggered by...
# Copyright (c) 2019, Build-A-Cell. All rights reserved. # See LICENSE file in the project root directory for details. from warnings import warn from .sbmlutil import * import warnings import copy import numpy as np class Species(object): """ A formal species object for a CRN A Species must have a name. T...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import sys import time import logging import itertools import collections from copy import copy, deepcopy import numpy as np from matplotlib import pyplot as plt try: import pygraphviz as pgv except ImportError: ...
import datetime import logging import os import sys from buildtest.defaults import BUILD_REPORT, BUILDTEST_REPORTS, console from buildtest.exceptions import BuildTestError from buildtest.utils.file import is_file, load_json, resolve_path from rich.table import Table logger = logging.getLogger(__name__) def is_int(v...
class Field: """ The class which holds the different names for a given field. The types of field names: - eod_name: The field name for the eodms_orderdownload (EOD) script, specified by the developer (KB) - rapi_id: The field ID used in the RAPI (ex: RSAT2.IMAGE_ID) - rapi_title...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # @lint-ignore-every BUCKRESTRICTEDSYNTAX """ shape.bzl provides a convenient strongly-typed bridge from Buck bzl parse time to Python runtim...
""" latest updates: class_0 handling in zigzag. Deleteing logs in device after saving in PC. (Keeplogs) validation takes any digit of phone number """ import subprocess import sys from subprocess import CalledProcessError import os import time from tkinter import * from functools import partial import uiautomator2 as ...
### mylang.txtを読み込み.lyファイルに書き込む import data # コードトーンを参照できるように import sys ### 初期化変数 output_gt = "" # .lyに書き込むギター部分の初期化 output_chord = "" output_lyrics = "" chord_all = [] chord_process_gl = [] def chord_select(chord_name): for chord in data.chords: if chord["name"] == chord_...
""" This module provides the implementation of an Quantity object. """ # NoQuantityReplacement from __future__ import absolute_import, unicode_literals import six from six.moves import range, zip # @UnresolvedImport from barril._foundation.odict import odict from barril.units.unit_database import UnitsError from ._u...
# Copyright 2021 <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, softw...
import numpy as np import pandas as pd import os from PIL import Image import copy from joblib import Parallel, delayed from tqdm import tqdm import pickle import os.path import torch import torch.nn as nn from torch.utils import data import torch.optim as optim import torch.nn.functional as F from torchvision import ...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'me' #me and <NAME> #irc clent / tkinter dev is moxi import socket import tkinter from tkinter import * import time import os import urllib.request import json import threading import random import multiprocessing from multiprocessing import Queue import q...
"""Module for the execution of the biophysical component of the InVEST Nutrient Deposition model.""" import logging import os import shutil import math from osgeo import gdal from osgeo import ogr import numpy import pygeoprocessing.geoprocessing import pygeoprocessing.routing import pygeoprocessing.routing.routing_...
from collections import OrderedDict from qtpy.QtGui import QStandardItemModel, QStandardItem from qtpy.QtCore import Qt from qtpy.QtWidgets import (QTableView, QWidget, QLabel, QStyledItemDelegate, QHBoxLayout, QVBoxLayout, QMessageBox, QPushButton) from .widgets ...
""" Classes for generating HTML forms """ import logging from six import string_types from cgi import escape from galaxy.util import restore_text, unicodify log = logging.getLogger(__name__) class BaseField(object): def __init__( self, name, value=None, label=None, **kwds ): self.name = name sel...
# -*- coding: utf-8 -*- # @Author: <NAME> # @Email: <EMAIL> # @Date: 2017-07-31 15:20:54 # @Last Modified by: <NAME> # @Last Modified time: 2020-03-31 18:15:43 from functools import partialmethod import numpy as np from ..core import PointNeuron, addSonicFeatures from ..constants import FARADAY, Rg, Z_Na, Z_Ca ...
import torch import torch.nn as nn import torch.optim as optim import numpy as np import time import logging from sklearn.metrics import roc_auc_score, f1_score from src.utils.utils import print_progessbar, get_best_threshold class DROCC_trainer: """ Trainer for the DROCC following the paper of Goyal et al. (...
#!/usr/bin/env python3 """SMA16 assembler.""" from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser from dataclasses import dataclass from difflib import get_close_matches from enum import IntEnum from os import path from struct import pack as struct_pack from sys import stderr, stdout from typing import D...
import colorsys import os from pathlib import Path import mmcv import numpy as np from scipy import interpolate from mmhuman3d.core.post_processing import build_post_processing try: from typing import Literal except ImportError: from typing_extensions import Literal def xyxy2xywh(bbox_xyxy): """Transfo...
"""Metrics for the computation of a Lens summary""" from __future__ import division import logging import time from functools import wraps from tdigest import TDigest import numpy as np from scipy import stats from scipy import signal import pandas as pd from .utils import hierarchical_ordering_indices DENSITY_N =...
""" Tokenizer --------- Classes with a .text_to_token_list method (and a bit more). Used by other modules as a means to convert stings to lists of strings. If you have a function that converts strings to lists of strings, you can make a tokenizer from it by using MakeTokenizer(my_tokenizing_func). SparseFormatter --...
from rdkit import Chem from rdkit.Chem import AllChem import re import os from subprocess import Popen import matplotlib.pyplot as plt from scipy.stats import linregress import numpy as np import argparse from multiprocessing import Pool # path_to_orca = "/usr/local/orca_4_1_1_linux_x86-64/orca" # path_to_orca = "/us...
import struct import os import re from collections import defaultdict from io import BytesIO from typing import Set from . import generic from .misc import read_non_whitespace, read_until_whitespace from . import misc from .crypt import _alg33_1, _alg34, _alg35, derive_key, rc4_encrypt import logging from .rw_common...
#!/usr/bin/env python # coding: utf-8 ################################## # Author: <NAME> # Copyright © 2020 The Board of Trustees of the Royal Botanic Gardens, Kew ################################## # # # wcvp_taxo # wcvp_taxo is a python3 script for matching and resolving scientific names against the WCVP databas...
#!/usr/bin/env python # -*- coding: utf-8; -*- import sys, os import re import enum import time import logging from typing import List import requests from lxml import etree logging.basicConfig(level=logging.INFO) class XenobladeLocation(enum.Enum): Colony9 = enum.auto() TephraCave = enum.auto() BionisL...
#!/usr/bin/env python3 import argparse from collections import Counter from itertools import combinations from math import lgamma, log, factorial import numpy as np import operator import os import pandas as pd from functools import reduce import sys import time import warnings ############################### ##### A...
import logging from hallo.events import EventMessage from hallo.function import Function from hallo.inc.commons import Commons import math logger = logging.getLogger(__name__) class Hailstone(Function): """ Runs a collatz (or hailstone) function on a specified number, returning the sequence generated. "...
from math import * import sys, argparse, time import numpy as np import mdtraj as md import general_scripts as gs try: import psutil bPsutil = True except: print( "= = = NOTE: Module psutil isnot available, cannot respect memory usage on this run.." ) bPsutil = False def print_selection_help(): pr...
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.3' # jupytext_version: 0.8.6 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # Usage of modeling # # Pleas...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """YOLO_v3 MobileNet Model Defined in Keras.""" from tensorflow.keras.layers import UpSampling2D, Concatenate from tensorflow.keras.models import Model from tensorflow.keras.applications.mobilenet import MobileNet from yolo3.models.layers import compose, DarknetC...
# -*- coding: utf-8 -*- # ******************************************************* # ____ _ _ # / ___|___ _ __ ___ ___| |_ _ __ ___ | | # | | / _ \| '_ ` _ \ / _ \ __| | '_ ` _ \| | # | |__| (_) | | | | | | __/ |_ _| | | | | | | # \____\___/|_| |_| |_|\___|\__(_)_| |_| |_|_|...
import time import pytest from requests import ReadTimeout, HTTPError from ctrlibrary.core.datafactory import ( gen_sha256, gen_string, gen_random_ctr_token ) from ctrlibrary.core.utils import get_observables from ctrlibrary.threatresponse.inspect import inspect from ctrlibrary.threatresponse.enrich import...
''' Type anomaly detection file ''' import numpy as np import pandas as pd import matplotlib.pyplot as plt import keras from keras.models import Sequential from keras.layers.core import Dense from tensorflow.keras import optimizers import keras.backend as K import json from sklearn.utils import shuffle import os impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Authors: <NAME>, <NAME> # # Note: The implementation of complex Batchnorm is based on # the Keras implementation of batch Normalization # available here: # https://github.com/fchollet/keras/blob/master/keras/layers/normalization.py import numpy as np...
#!/usr/bin/env python # Copyright 2014 <NAME> # Copyright 2020 plyara Maintainers # # 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...
import json import logging import typing import urllib.request import shlex import argparse from discord.ext import commands from discord.ext.commands import CommandError, Context import discord from discord import Embed from discord import Color from datetime import datetime, timedelta from cogbot import checks f...
import psutil import time import torch import math from collections import deque import numpy as np from rlpyt.runners.base import BaseRunner from rlpyt.utils.quick_args import save__init__args from rlpyt.utils.seed import set_seed, make_seed from rlpyt.utils.logging import logger from rlpyt.utils.prog_bar import Pro...
#!/usr/bin/env python3 from signals import SignalGenerationLayer, create_synthetic_dataset import os import numpy as np import argparse import configparser from model import EncoderTrainer import tensorflow as tf from tensorflow import keras import tensorflow_addons as tfa import wandb from wandb.keras import WandbC...
import collections import logging import numpy as np import gym import cv2 from core.log import do_logging from utility.utils import infer_dtype, convert_dtype from utility.typing import AttrDict from env.typing import EnvOutput, GymOutput # stop using GPU cv2.ocl.setUseOpenCL(False) logger = logging.getLogger(__name...
# -*- coding: utf-8 -*- ################################################################# # File : camera_compare.py # Version : 0.0.1 # Author : sebi06 # Date : 21.10.2021 # # # This code probably does not reflect the latest new technologies # of microscope cameras anymore but is hopefully stil...
# encode: sequence of objects to bytearray # interpret: pattern, bytearray to sequence of objects # Each object might be a singleton instance representing a single # bytecode and its meaning, or it might be something like a device # address (three bytes). # A Pattern has a sequence of types. Pattern also impl...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ A "grab bag" of relatively small general-purpose utilities that don't have a clear module/package to live in. """ from __future__ import (absolute_import, division, print_function, unicode_literals) im...
# Custom mutable string class, emulating some of Ruby's method # Many comments are copied from Ruby's documentation __all__ = ['String'] import hashlib import re from collections import namedtuple from copy import copy from functools import total_ordering import rb2py.pack from rb2py.error import * from rb2py.pathn...
import os import shutil import logging import argparse import getpass import re from contextlib import redirect_stdout from collections import defaultdict from typing import List from ...commands.report import outfile_path from ...util import FatalError, run, apply_patch, qjoin, require_program from ...target import Ta...
# PyFlightLogTool made by MiguelFox # Version 0.1.5, 09.02.2022 from datetime import date from prettytable import PrettyTable import csv std_logbook_path = '' class AircraftInfo: xplane_type = '' manufacturer = 'Unknown mfr.' aircraft_type = 'Unknown type' engines_count = 1 engines_type = 'Unk...
import os from os import path as osp import numpy as np from tqdm import tqdm import pickle import cv2 import torch from experiments.service.benchmark_base import Benchmark from experiments.service.ldd_factory import LocalDetectorDescriptor from experiments.service.matchers_factory import MatchersFactory from experimen...
import autograd import autograd.numpy as np import scipy as sp import LinearResponseVariationalBayes as vb import LinearResponseVariationalBayes.SparseObjectives as obj_lib from copy import deepcopy import math def set_par(par, val, is_free): if is_free: par.set_free(val) else: par.set_vect...
"""The MIT License (MIT) Copyright (c) 2016-2017 <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, p...
def main(): """Main module that runs waterpy. This module contains functionality that: - Read model configurationo file - Read all input files - Preprocess input data - Calculate the timestep daily fraction - Calculate pet if not in timeseries - Calculates adjusted precipit...
# This file is released under terms of BSD license` # See LICENSE.txt for more information """Internal serialization module that wraps the dynamic library of serialbox. This module is used by the Serializer module. """ from __future__ import print_function import os import sys from os.path import join as pjoin impor...
"""Various one off plots. Usage: ./plots.py Author: <NAME> - 2021-08-30 """ import matplotlib.pyplot as plt import pandas as pd import numpy as np from typing import List, Optional from scipy.stats import norm from warzone.base import normalize, running_mean, cumulative_mean from warzone.document_filter import Docu...
""" This module contains the logic to execute tasks and their dependencies to completion. """ import logging from concurrent.futures import wait, FIRST_COMPLETED, ALL_COMPLETED import attr from .task_execution import ( EntryLevel, EntryPriority, EntryStage, EntryRequirement, RemoteSubgraph, T...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # graph_tool -- a general graph manipulation python module # # Copyright (C) 2006-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 Fou...
#!/usr/bin/env python # Copyright 2017 Johns Hopkins University (<NAME>) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import copy import json import logging import math import os import re # chainer related import chainer from chainer.datasets import TransformDataset from chainer import reporter as ...
import sys sys.path.append("..") sys.path.append("../..") import numpy as np import os import argparse from sklearn.metrics import accuracy_score import tensorflow as tf from data.synthetic_dataset_wt_conf_za_link import SyntheticDataset, confounder_monotonicities_1,get_subportion_confounders import pandas as pd fro...
#!/usr/bin/env python3 """ # Utility for controlling RGB header on MSI boards # The RGB header is controlled by the NCT6795D Super I/O chip. # # The Advanced "mode" is enabled by writing 87 87 to PORT 1. # It is later disabled by writing AA # to that same port. `07 12` then selects the bank 12h. # This bank then looks...
# -*- coding: utf-8 -*- import math import DateUtils import Interpolation import YieldCurve # import OptimizationMethods def FindPosition(point, points): """Determines the position of point in the vector points""" if point < points[0]: return -1 for i in range(len(points) - 1): ...
from datetime import datetime, timedelta, timezone from enum import Enum import logging import pickle from typing import Collection, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union import aiomcache import numpy as np import pandas as pd import sentry_sdk from sqlalchemy import and_, desc, insert, outer...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import os import sys import pickle import numpy as np import tensorflow as tf from nnli.parser import SNLI from nnli import util from nnli import tfutil from nnli import embeddings as E from nnli import evaluation from nnli.models import ConditionalB...
#!/usr/bin/env python # 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...
import json import logging from copy import copy from datetime import timedelta from typing import List import requests from actstream import action from celery import Task, group from constance import config from django.conf import settings from django.contrib.auth.models import User from django.core.mail import send...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This program collects Spain weather forecasts from AEMET and uploads them to the Orion Context Broker. It use predefined list of municipalities (./stations.yml), that can be obtained by other harvester: - https://github.com/FIWARE/dataModels/tree/master/...
"""The HyParView protocol node implementation.""" import ast import asyncio import enum import sys import time import uuid from collections import deque from . import exceptions as excp from . import connect as conn from . import constants as consts from .peer import Peer from .rw_lock import RW_Lock from . import ut...
""" By <NAME> (DTAI lab KU Leuven, 2019) A script to create a ProbLog dataset (script_dataset.py) and perform a learning experiment on it. Input files are read from ./data/raw/inputfile.pl and files will be created in ./data/processed/ and ./data/results/ """ import os import sys import ulearner import experiments_ut...
# -*- coding: utf-8 -*- ### ### Copyright 2009 The Chicago Independent Radio Project ### 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.a...
import tensorflow as tf import re import os import json import numpy as np import codecs from configs.event_config import event_config from data_processing.event_prepare_data import EventRolePrepareMRC, EventTypeClassificationPrepare from tensorflow.contrib import predictor from pathlib import Path from argparse impo...
import cv2 import numpy as np from .grasp_learner import grasp_obj from .grasp_predictor import Predictors from .shake_learner import shake_obj from .force_filter_learner import force_filter_obj from .five_filter_learner import five_filter_obj from .shake_predictor import Predictors as Adv_Predictors from .grasp_learne...
#!/usr/bin/env python3 # Copyright 2021 <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 agree...
""" Author: <NAME> (@zujko) <NAME> (@lxy5611) Description: Handles views and endpoints for all petition related operations. Date Created: Sept 15 2016 Updated: Oct 03 2017 """ import json import logging from collections import namedtuple from datetime import timedelta from profile.models import Profile from dj...
# Fraud detection models # Call the functions with data, parameters and the hitlist. # The hitlist will be returned, extended with results of the model import numpy as np import numpy.random as rn import pandas as pd import matplotlib.pyplot as plt import datetime as dt import pickle, os, time, sys, itertools, string...
import os from selenium import webdriver import random import time from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.common.act...
# -*- coding: utf-8 -*- """ Here is a three inputs runner. We make it for 3 inputs becuase mostly we run a function at different basis function order p, elements layout k and crazy coefficient c. <unittest> <unittests_P_Solvers> <test_No3_TIR>. <NAME> (C) Created on Mon Oct 29 15:38:46 2018 Aerodynamics, AE TU Del...
#!/usr/bin/env python # ============================================================================= # GLOBAL IMPORTS # ============================================================================= import os import math import csv import json from collections import OrderedDict import numpy as np from simtk import ...
#!/usr/bin/env python from mbox import mbox import decimal import simplejson as json import datetime import platform import logging import gettext import sys # Logging Set Up logger = logging.getLogger(__name__) def exception_hook(logger, exc, val, tb): logger.error("An Unexpected Error: %s", val, ...
""" Support for rendering views.... """ import matplotlib.pyplot as plt from matplotlib.pyplot import imshow import IPython import time import json import base64 import io import collections import threading import pandas as pd import ipywidgets as widgets from ipywidgets.widgets.interaction import show_inline_matplotl...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import bisect import datetime import importlib import json import os import re import time import warnings from base64 im...
""" Copyright (c) 2014, Samsung Electronics Co.,Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and...
#!/usr/bin/env python3 # Author: <NAME> (<EMAIL>) # License: BSD-3-Clause import os import numpy as np import astropy.units as u import matplotlib.pyplot as plt import matplotlib import pandas as pd from astropy import units as u from astropy.cosmology import Planck15 as cosmo from astropy import constants as const fr...