text
stringlengths
3.07k
22.1k
from __future__ import annotations from empire import * from empire.enums.base_enum import BaseEnum from empire.bit.flags import has_flag from empire.empire_io.io_modes import IOModes from empire.empire_io.io_flows import IOFlows from empire.fs.file_system import FileSystem from empire.fs.paths import Paths ...
# -*- coding: utf-8 -*- # BitcoinLib - Python Cryptocurrency Library # ENCODING - Methods for encoding and conversion # © 2016 - 2018 October - 1200 Web Development <http://1200wd.com/> # © 2019 July - mkbeh # # This program is free software: you can redistribute it and/or modify # it under the terms...
#!/usr/bin/env python """ MIT License Copyright (c) 2017 Raphael "rGunti" Guntersweiler 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 right...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ mcimage MIT License Copyright (c) 2020 <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...
import numpy as np import cv2 import math import torch import torch.nn as nn import torch.nn.functional as F from model_base_layers import Upsample, Downsample, Blur, Amplify, AddChannelwiseBias, \ EqualizedFullyConnect, PixelwiseNoise, PixelwiseRondomizedNoise, \ ...
# Simple Python ESP32 WiFi interface # Runs under pimoroni-pico-v0.2.6-micropython-v1.16.uf2 # See https://github.com/pimoroni/pimoroni-pico/releases/tag/v0.2.6 # # For detailed description, see https://iosoft.blog # # Copyright (c) 2021 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you m...
import fnmatch import os import re import subprocess from distutils.command.build import build from setuptools import setup def find_package_data_files(directory): for root, dirs, files in os.walk(directory): for basename in files: if fnmatch.fnmatch(basename, "*"): filename =...
import subprocess import sys from typing import Any, Dict, List, Optional, Tuple import click from rich import box, table from coalescenceml.config.profile_config import ProfileConfiguration from coalescenceml.constants import console from coalescenceml.directory import Directory from coalescenceml.enums import Stack...
""" Classes for the Circumgalactic Medium """ from __future__ import print_function, absolute_import, division, unicode_literals import numpy as np import warnings import pdb from astropy import units as u from astropy import cosmology from linetools import utils as ltu from pyigm.field.galaxy import Galaxy from p...
import math class ROBDD: # Init the ROBDD with nVars = number of variables in the expression def __init__(self,nVars,switch = 0): self.nVars = nVars self.switch = switch self.nNodes = 0 self.nNodes_ = 0 self.x = [] self.anySatX = [] for item in range(nVa...
import sqlalchemy import db import datetime import constants from urlhandler import UrlHandler from db import Task class MessageException(Exception): """Just to specify a kind of Exception""" pass class TaskManager: def __init__(self): self.url_handler = UrlHandler() def deps_text(self, tas...
from collections import OrderedDict from functools import reduce import json import numpy as np from operator import mul import os import pickle from pprint import pprint import random import sys import subprocess config_file, sweep_progress, command = sys.argv[1], sys.argv[2], sys.argv[3:] with open(config_file, 'r'...
from collections import Counter import sys import os from discoutils.tokens import DocumentFeature from discoutils.misc import mkdirs_if_not_exists from eval.pipeline.feature_extractors import FeatureExtractor sys.path.append('.') import json import gzip import argparse import logging from joblib import Parallel, de...
import numpy as np import src.plots as plots from src.environment.actions_and_positions import Actions, Positions def mean_over_std(x): std = np.std(x, ddof=1) mean = np.mean(x) return mean / std if std > 0 else 0 class Environment(): def __init__(self, df, window_size, path_plots, log_returns_scale...
# -*- coding:utf-8 -*- # @time :2020/8/13 # @IDE : pycharm # @author :lxztju # @github : https://github.com/lxztju # @Emial : <EMAIL> import torch import argparse import os import math import torch import torch.nn as nn import torch.optim as optim import matplotlib.pyplot as plt import shutil import pandas as pd from...
import re import torch import unicodedata from abc import abstractmethod from typing import List, Union, Dict, Set, Optional from .import_utils import ( is_available_kss, is_available_nltk, ) SPACE_NORMALIZER = re.compile(r"\s+") InputTexts = Union[str, List[str]] TokenizedOutput = Union[List[str], List[Lis...
import datetime import os import yaml from .spec import Spec class Entity: """Anything that ever physically existed can be considered an entity. This class acts as a parent for the thing and context classes. In practice, general entities don't get created (nor are they fun or useful). Attributes (all private. U...
import csv import click import requests import json import uuid import logging import sys from requests.auth import HTTPBasicAuth format_type = '%(asctime)-15s %(message)s' logging.basicConfig(filename='errors.log', filemode='w', format=format_type) url_ws = 'https://api.wattsense.com' config_path = './codec_manifest....
import torch from datetime import datetime from glob import glob from pytorch_lightning.utilities.distributed import rank_zero_only from klib.misc import push_file_to_wandb from pathlib import Path from klib import CustomWandbLogger, process_click_args, int_sequence, UnlimitedNargsOption import click import os import ...
import inspect import os import numpy as np import h5py import psoap from psoap import constants as C def redshift(wl, v): ''' Redshift a vector of wavelengths. A positive velocity corresponds to a lengthening (increase) of the wavelengths in the array. Args: wl (np.array, arbitrary shape): the ...
import os import pandas as pd import pytest from metrics_layer.core import MetricsLayerConnection from metrics_layer.core.model.project import Project from metrics_layer.core.parse.manifest import Manifest from metrics_layer.core.parse.project_reader import ProjectReader BASE_PATH = os.path.dirname(__file__) model_...
# coding: utf-8 import multiprocessing import threading import tensorflow as tf import numpy as np import gym import os import shutil import matplotlib.pyplot as plt def preprocessing_image(obs): #where I is the single frame of the game as the input """ prepro 210x160x3 uint8 frame into 6400 (80x80) 1D float vect...
import zmq import imagezmq import numpy as np import cv2 import imutils from imutils.video import VideoStream import time import typing try: from picamera import PiCamera PICAM: bool = True except OSError: PICAM: bool = False class NetworkAgent: """Class representing a NetworkAgent, able to bind/con...
import sys import requests import ConfigParser #from multiprocessing.dummy import Pool as ThreadPool from IPython import embed import pandas as pd import numpy as np from genda import calculate_minor_allele_frequency, calculate_ld from genda.AEI import AEI, dosage_round pd.options.mode.chained_assignment = None de...
#!/usr/bin/env python3 import argparse import base64 import datetime import glob import json import os import re import sys from shutil import copyfile BACKUPS_TO_KEEP = 20 def patch_subnet_export(out): """ Fix router table export names. KLUDGE: the ic_router_table.js has export names derived from n...
from flask import Flask from flask_restplus import Api, Resource, fields app = Flask(__name__) app.config['ERROR_404_HELP'] = False api = Api(app, version='1.0', title='Author API', description='A simple Author API' ) ns_author = api.namespace('authors', description='Author operations') ns_book = api.namespace('b...
# 2019/09/07 <NAME> # vim:ts=4 sw=4 et: import math import numpy as np import os import sys import struct #------------------------------------------------------------------------------ class mnist_loader: def __init__( self, keras ): self.keras= keras def convert_x( self, data )...
# -*- coding: utf-8 -*- import numpy as np from ssim.ssim_base import * import skimage.measure import ctypes import imageio import re ssim_dll_path = os.path.split(os.path.realpath(__file__))[0] ssim_dll_name = 'ssim.dll' if (os.name == 'nt') else 'libssim.so' class Loader: if (os.path.exists(os.path.join(ssim_d...
import wx import requests import re import json import frame from pyswip import Prolog # Helper function to enumerate all options and return them as dict and list def list_to_dict(lst): d = {} l = list(set(lst)) for i in range(len(l)): d[i] = l[i] return d, l class MainFrame(frame.botframe)...
from discord.ext import commands import json import glob import random import datetime import calendar sister_groups = ['nmb48', 'ske48', 'hkt48', 'ngt48', 'nogizaka46', 'jkt48', 'snh48'] from discord.embeds import Embed class Social48Images(object): @staticmethod def list_previous_months(count=3): ...
""" Created by <NAME> on September 24, 2019 infoGAIL benchmark in the toy domain """ import torch.optim as optim import torch import torch.nn as nn import numpy as np import math torch.backends.cudnn.deterministic = True torch.backends.cudnn.benchmark = False torch.manual_seed(49) # ensures repeatability np.random.se...
import numpy as np import random import math import selection_methods import crossover_methods import mutation_methods import elitism_methods import test_functions import streamlit as st # Basic and Auxiliary Functions # Group of basic functions, responsible for the processes of creating the ranges of...
"""This file contains descriptor classes that use the direction of one atom to another in the molecule to descripte the environment Author: <NAME>, QCIEP, <NAME> """ import numpy as np from scipy.special import sph_harm #------------------------------------------------------------------------------- # Low ...
""" Module of manager for managing multiple bulbs. """ import logging import platform import subprocess import threading import time from copy import copy from queue import Queue from typing import List import ifaddr from sqlalchemy import func from yeelight import discover_bulbs, BulbException from .bulb import Bulb...
from schrodinger.application.desmond.packages import topo, traj, traj_util, analysis import sys import argparse import pickle import numpy as np import matplotlib.pyplot as plt sys.setrecursionlimit(20000) def gromos(rmsd, threshold, nmax): def gromos_inner(the_rmsd, the_threshold, n_max): # gromos clust...
# run_grtrans_3D.py # runs grtrans on koral simulation images at very high resolution # these will take a long time! import grtrans_batch as gr import numpy as np import sys import os import subprocess import time import astropy.io.fits as fits import scipy.ndimage.interpolation as interpolation ####################...
"""Base station positing calibration. Calibrating position and rotation for both base stations based on angle-data fom 4 point measrunments. """ # Importing dependencies import math import numpy as np # General Support Methods def norm(x): """Wrapp for numpy vector norm.""" return np.linalg.norm(x) def n...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import keras import tensorflow as tf # DataFrame import pandas as pd # Matplot import matplotlib.pyplot as plt # Scikit-learn from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder from sklearn.manifold import TSNE # Keras from keras.preprocessing.text import Tokenizer from ...
from magi.magicollections import ( MagiCollection, AccountCollection as _AccountCollection, ActivityCollection as _ActivityCollection, BadgeCollection as _BadgeCollection, UserCollection as _UserCollection ) from cpro import models, forms, filters, collections_settings, utils #####################...
"""Makes a leaderboard out of experiments""" __author__ = '<NAME>' __date__ = '2019-01-14' import json import os from collections import defaultdict from tabulate import tabulate import numpy as np import matplotlib.pyplot as plt import pandas as pd from ilurl.loaders.emission import (get_emissions, get_vehicles, ...
""" after preparing sample point geopackages for all cities, use this is script to get all the final output "global_indicators_hex_250m.gpkg" and "global_indicators_city.gpkg" """ import json import os import time import pandas as pd import geopandas as gpd import sys def aggregation(gdf_hex, gdf_sam...
# The SystemVerilog sequences provided much more functionality # than most users ever used. This led to extremely complicated # code. # # This file implements the uvm sequence functionality in # Python using Python features instead of emulating # SystemVerilog features. from pyuvm.s05_base_classes import * from pyuvm...
import json import os import zeeguu.core from apimux.api_base import BaseThirdPartyAPIService from apimux.mux import APIMultiplexer from apimux.log import logger from python_translators.config import get_key_from_config from python_translators.query_processors.remove_unnecessary_sentences import ( RemoveUnnecess...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """This module handles :ref:`catalog spectra <stsynphot-spec-atlas>`.""" # STDLIB import numbers # THIRD-PARTY import numpy as np # ASTROPY from astropy import units as u from astropy.io import fits # SYNPHOT from synphot import exceptions as synexcept...
""" This saves figures showing the results of various clustering algorithms, including AutoGMM, agglomerative clustering, k-means, naive GM (using single or mutiple inits), on the double-cigar dataset. It outputs the two subplots of Figure 7 in the paper. """ #%% import numpy as np import matplotlib.pyplot as plt from...
# ******************************************************************************* # # Copyright (c) 2017-2021 <NAME>. All rights reserved. # # ******************************************************************************* import operator, random import numpy as np import scipy.stats from coppertop.pipe import * f...
# -*- coding: utf-8 -*- import logging import time import datetime import threading import uuid from collections.abc import Callable from typing import Union, Sequence, Any, Tuple, List import types logger = logging.getLogger('pycronner') class JobStatus(object): def __init__(self): self._is_running = F...
''' Author: <NAME> Functions for perfect phylogeny and incomplete phylogeny algorithms ''' import numpy as np import copy import string import subprocess from mgraph import MGraph def get_duplicates(items): ''' returns the indices of all duplicates in a list @param items a 1D list ''' locs = [] ...
#!/usr/bin/env python import random from lib.tools.db_parse import App as XML_Parse from sys import argv, platform from traceback import print_exc # VN = 'vn' SO = 'so' HS = 'hs' BA = 'ba' # NAME = 'name' TAG = 'tag' # SIZE = 'size' ATMOSPHERE = 'atmosphere' HYDROSPHERE = 'hydrosphere' POPULA...
from opentrons import robot, containers, instruments import argparse import numpy as np import pandas as pd import getch import shutil import os import sys import cv2 import ot_functions as ot # Take in the 'run' argument from the command line parser = argparse.ArgumentParser(description="Resuspend a plate of DNA on ...
''' The MIT License (MIT) https://github.com/robertchase/spindrift/blob/master/LICENSE.txt ''' import gzip import time import json import urllib.parse as urlparse from spindrift.network import Handler import logging log = logging.getLogger(__name__) class HTTPHandler(Handler): def _on_init(self): """H...
import warnings from typing import Optional, Tuple, Union import numpy as np import numpy.typing as npt from pybasic.linalg import dct2d, idct2d, fro_norm, l1_norm from pybasic.utils import timed_ctx rng = np.random.default_rng(seed=0) def scalar_shrink(arr: npt.NDArray, epsilon: float) -> npt.NDArray: return ...
""" #The below is edited based on work from <NAME> (date created 2019-04-16-12-28, <EMAIL>) https://github.com/raspstephan/Lorenz-Online/blob/master/L96.py # #https://hub.gke2.mybinder.org/user/raspstephan-l96-visualization-vn2xzwv1/notebooks/L96-visualization.ipynb# """ import sys def in_notebook(): """ Ret...
# encoding: utf-8 import os import sys import json import shutil import unittest from copy import deepcopy from configurationutil import cfg_params, Configuration from configurationutil.cfg_objects import cfg_item from fdutil.path_tools import pop_path # Register Config details (These are expected to be overwritten b...
from collections import OrderedDict from csv import DictWriter from datetime import datetime from functools import reduce import operator import sys import numpy from tabulate import tabulate from .._compat import pickle from .util import ansi from .util import get_conv_infos from .util import is_conv2d class Print...
""" Arpabet ------- https://en.wikipedia.org/wiki/Arpabet """ from collections import OrderedDict import csv from itertools import product import json from os.path import dirname, exists, join VOWELS = ('AA', 'AE', 'AH', 'AO', 'AW', 'AY', 'EH', 'ER', 'EY', 'IH', 'IY', 'OW', 'OY', 'UH', 'UW') CONSONANTS = ...
from mesa import Agent, Model from directions import Directions from agent_types import AgentTypes as agt from directions import Directions as dirs from grid_manager import NodeTypes from astar import * # Represents a building, not much will be happening with this agent since it's not even going to be added to the sc...
#!/ust/bin/python3 import logging as l l.root.setLevel(l.DEBUG) import urllib.request, urllib.error import os import json import random import threading display = None try: import pygame pygame.init() display = pygame.display.set_mode((100, 100)) NOGUI = False except ImportError: l.warning("Error...
''' Created on Nov 16, 2016 @author: sarker ''' import os import numpy as np import DataIOFactory as dataIO import csv from sklearn.neural_network import MLPClassifier from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix from sklearn.metrics import f1_score import re import Util as ...
import random import functools import collections iupac_count = { 'A': 1, 'C': 1, 'G': 1, 'T': 1, 'R': 2, 'Y': 2, 'S': 2, 'W': 2, 'K': 2, 'M': 2, 'B': 3, 'D': 3, 'H': 3, 'V': 3, 'N': 4, 'U': 1 } iupac_space_rna = { 'A': {'A'}, 'C': {'C'}, 'G': {'G'}, 'U': {'U'}, 'R': {'A', 'G'}, 'Y': {'C', 'U'...
import argparse import sys import os import io import math import os.path import tempfile import numpy as np try: from plyfile import PlyData, PlyElement except: print('Install python-plyfile from https://github.com/dranjan/python-plyfile (using pip: pip install plyfile') sys.exit(1) def main(argv=None): ...
import pandas as pd import numpy as np import os import func.fndatetime as fdt import func.fnlook as flk import func.fnstr as fst import db.db as sq from datetime import * pt1 = os.getcwd() + "\\refdb\\S30.csv" pt2 = os.getcwd() + "\\refdb\\S1800_200.csv" df1 = pd.read_csv(pt1) df0 = pd.read_csv(pt2) def get_region...
# performance.py # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> """ This module contains performance measures that are used to evaluate the model but are not explicitly used as losses for optimization. IMPORTANT: MANY OF THESE FUNCTIONS ASSUME THE INPUTS TO BE PREDICTED LOG PROBABILITIES AND TRUE COUNTS. THE...
# -*- coding: utf-8 -*- from datetime import datetime import pytz import anyjson from celery import schedules from werkzeug import MultiDict from voluptuous import MultipleInvalid from flask import Flask, request, jsonify, json from asynx_core.taskqueue import (Task as _Task, TaskQu...
from __future__ import absolute_import, division, print_function import uuid import time import copy import vivarium.actor.event as event from vivarium.actor.actor import Actor class Simulation(object): """Interface for the Inner agent's cell simulation.""" def time(self): """Return the current tim...
"""Usage: first download the data (about 12.5GB). pip install gdown gdown https://drive.google.com/uc?id=16xlZWvR9Ml0TM0VEgrBGnFbcpzA4uLOY tar -xvf bair_dataset_numpy.tar.gz In each numpy file there are the following keys: data = np.load("train00.npz") images = data["images"] # T x K x H x 64 x 64 x 3, dtype=np.uint8 ...
import json import sys import pygame from pygame.locals import * from game import playGame WHITE = (255, 255, 255) BLACK = (0, 0, 0) class Button(): """ Class to create a new button in pygame window. """ # initialise the button def __init__(self, colour, x, y, width, height, text=""): s...
# Copyright (c) 2020, salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root # or https://opensource.org/licenses/BSD-3-Clause import requests from thefuzz import process, fuzz from wrapt_timeout_decorator import timeout from ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """This module define the Frames available for computation and their relations to each other. The relations may be circular, thanks to the use of the Node class. .. code-block:: text ,---. ,-------. ,----. |G50|---bias---|EME2000|..bias..|GCRF| ...
import math from typing import List import pytest import numpy as np from flaky import flaky from fiesta_test import model_generator, split_data from fiesta.util import pull_arm, belief_calc, lists_same_size, fc_func_stats from fiesta.util import fb_func_stats @pytest.mark.parametrize("mean", (2, 3, 10, 0.7)) @pytes...
"""Populate the database with the base information for faster querying.""" import logging from tqdm import tqdm from sqlalchemy import func from datetime import datetime from typing import List, Union, Dict from ebel_rest import query as rest_query from drugintfinder.constants import DRUG_COUNT, DRUG_METADATA, CLINIC...
import asyncio # import json import re from datetime import datetime import discord import requests from bs4 import BeautifulSoup from gspread.exceptions import APIError from pytz import timezone import config from utils import db as googledrive, channel as ch class WebSpider: def __init__(self, bot, drive_shee...
import torch import numpy as np import torch.nn as nn from .ops import get_norm_layer from .ops import weights_init class ResNetBlock(nn.Module): def __init__(self, dim: int, use_bias: bool = False): super(ResNetBlock, self).__init__() norm_layer = get_norm_layer('instance') conv_block:...
import pytest import os import distutils.spawn import numpy as np from astropy import units as u from astropy import log from ..core import parse_outfile,pyradex,Radex exepath = 'Radex/bin/radex' #if os.path.isfile(exepath) and os.access(exepath, os.X_OK): # exepath = exepath if distutils.spawn.find_executable('ra...
import numpy as np from ..leja19_smf import leja19_continuity_model_smf from ..leja19_smf import ( DEFAULT_DBL_SCHECHTER, DEFAULT_DBL_SCHECHTER_FITTER, DBL_SCHECHTER_FITTER_BOUNDS, _double_schechter, _double_schechter_fitter, ) LOGSM_Z1 = np.array( ( 8.044, 8.169, 8.29...
# -*- coding: UTF-8 -*- # Copyright 2008-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) from __future__ import unicode_literals from __future__ import print_function import logging logger = logging.getLogger(__name__) from django.db import models from django.db.models import Q from django.conf imp...
import numpy as np import scipy.fftpack import scipy.io import scipy.ndimage import scipy.stats from ..utils import * def gauss_window_full(lw, sigma): sd = np.float32(sigma) lw = int(lw) weights = [0.0] * (lw) sd *= sd center = (lw-1)/2.0 for ii in range(lw): x = ii - center ...
import os import sys import argparse import json def get_LCA(taxidlist): answer = {} for i in taxidlist: val = i.strip().split(';') for num,name in enumerate(val): if num not in answer: answer[num] = {} if name == "NA": continue if name not in answer[num]: answer[num][name] = 0 answer[n...
from collections import deque import numpy as np from typing import Tuple, Dict, Optional, Any, List import logging logger = logging.getLogger('sarbor') Bounds = Tuple[np.ndarray, np.ndarray] class Node: """ Basic Node datastructure, has basic getter and setter methods """ def __init__(self, **kwar...
import os import numpy as np import pandas as pd import warnings from mikeio import eum from ..observation import Observation, PointObservation, TrackObservation from ..comparison import PointComparer, TrackComparer from .abstract import ModelResultInterface, MultiItemModelResult, _parse_itemInfo class _XarrayBase: ...
from torch.utils.data import DataLoader, Dataset, Sampler from pathlib import Path from collections import defaultdict import json import random from multiprocessing import Pool import h5py import pickle import math from tqdm import tqdm import torch import numpy as np import csv from copy import deepcopy from torch.u...
from __future__ import annotations from typing import TYPE_CHECKING, Generic, TypeVar from sqlalchemy import tuple_ from sqlalchemy.orm import Session from telegram import error, ChatMember from telegram.utils.helpers import escape_markdown, mention_markdown from ._strings import STREAK_MARK from .models import Give...
import glob import itertools import math import os import typing from collections import OrderedDict import gym import numpy as np import yaml from ray.rllib.env import MultiAgentEnv from ray.tune.registry import register_env if os.environ.get("USE_PY_NATIVERL"): import pathmind_training.pynativerl as nativerl el...
############################################################ # CMPSC 442: Homework 4 ############################################################ student_name = "<NAME>" ############################################################ # Imports ############################################################ # Include your ...
#!/usr/bin/python3 __doc__ = 'Display name fields and other bits for linking fonts into families' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2021 SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = '...
# -*- coding: utf-8 -*- """ Deeplabv3+ model for Keras. This model is based on TF repo: https://github.com/tensorflow/models/tree/master/research/deeplab On Pascal VOC, original model gets to 84.56% mIOU MobileNetv2 backbone is based on this repo: https://github.com/JonathanCMitchell/mobilenet_v2_keras # Reference -...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/security_keys.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, th...
''' ratio_dumper - Ratio iX5M Log Dumper MIT License Copyright (c) 2021 <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...
import pygame from pygame.locals import * import pymunk from pymunk.pygame_util import * from pymunk import Vec2d import math BLACK = (0, 0, 0) WHITE = (255, 255, 255) pygame.init() size = 1200, 600 screen = pygame.display.set_mode(size) font = pygame.font.Font(None, 48) background = pygame.image.load('background.p...
# PROGRAMMER: <NAME> # DATE CREATED: Nov 25 2018 # REVISED DATE: Dec 1 2018 # PURPOSE: It will train a new network on a dataset and save the model as a checkpoint ## # Imports python modules import argparse import torch import os import traceback import logging impo...
# Copyright (c) 2021, 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 required by applic...
from src.util import embeds def format_string(string): # Return strings without decimal points or with exponents without editing if not "." in string or "e" in string: return string # Split string into an integer portion and a decimal portion splitString = string.split(".") # If the firs...
import tensorflow as tf import numpy as np import time from Featurize import * import argparse import glob from multiprocessing import Pool import numpy as np import time from rdkit import Chem from rdkit.Chem import rdDepictor, Draw from io import BytesIO import os import argparse def GetNodeMask(graph_size, max_siz...
#!/usr/bin/env python3 from typing import Optional, Union from typing import TextIO from typing import Iterator from predectorutils.gff import ( GFFRecord, GFFAttributes, Target, Strand, ) from predectorutils.analyses.base import Analysis, GFFAble from predectorutils.analyses.base import str_or_none ...
# Copyright (C) 2018 Cancer Care Associates # 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import sys import fcntl import cPickle import argparse space_path = os.path.expanduser('~/.f') config_pickle = 'config.pickle' config_raw = 'config.cfg' inner_config = { 'db_pickle': os.path.join(space_path, 'db.pickle'),...
#!/usr/bin/env python """Resamples images from individual CCDs to ideal camera geometry and mosaicks them into a single cube. Data Flow --------- Input Products: - RED ``balance.cub`` files which are the result of HiccdStitch. Output Product: - ``NOPROJ.cub`` """ # Copyright 2008-2020, Arizona Board of Regents on...
import torch from torch.utils.data.dataset import Dataset import numpy as np import os import scipy.io import scipy.misc as m from PIL import Image import random from scipy.ndimage import gaussian_filter from torchvision import transforms from config.option import Options import matplotlib.pyplot as plt import config.C...
import calendar import datetime import logging import re import socket from typing import Optional, Dict from urllib.parse import quote from uuid import uuid4 import requests from requests.exceptions import RequestException, HTTPError, SSLError from requests.exceptions import ConnectionError from requests.structures i...