text
stringlengths
3.07k
22.1k
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals import shutil from collections import defaultdict from io import ...
import os import shutil import re from typing import Union, TextIO, List, AnyStr import smpl.exec as exec import smpl.log_module as logger dry_run = False # # Configure util for a dry_run - be sure to pass this on to exec module # as well # def configure(dryrun): dry_run = dryrun exec.configure(arg_dry_run=d...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
"""Pipeline for VTK filters.""" # Author: <NAME> <<EMAIL>> # License: BSD 3 clause from .decorators import wrap_input from .wrappers.algorithm import BSAlgorithm from .wrappers.data_object import BSDataObject # From https://vtk.org/Wiki/VTK/Tutorials/New_Pipeline # Outputs are referred to by port number while # in...
from collections import defaultdict from datetime import datetime, timedelta, timezone from unittest.mock import MagicMock import pytest CERT1_ZO_NE = {'CertificateArn': 'arn:aws:acm:eu-west-1:cert1', 'CreatedAt': datetime(2016, 4, 1, 12, 13, 14, tzinfo=timezone.utc), 'DomainName': '*.zo...
import numpy as np import xarray as xr import gcpy # Must have: # 1. extract_grid (returns an xarray Dataset) # 2. grid_area (returns a 6xNxN array) # 3. gen_grid (returns an xarray Dataset) def extract_grid(ds,src_var='Xdim'): # Extract grid from xarray dataset but return a cubed-sphere grid n_cs = ds[src_v...
import random from datetime import datetime from itertools import chain import numpy as np import torch from tensorboardX import SummaryWriter from torch.optim import Adam from torch.utils.data import DataLoader import constants import models from constants import TRAIN_BATCH_SIZE, TRAIN_DATA_LOAD_WORKERS, LEARNING_R...
# Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES # # SPDX-License-Identifier: BSD-3-Clause import functools import cupy import numpy try: import torch except ImportError: torch = None from cuquantum import Network from cuquantum import NetworkOptions, OptimizerOptions from .data import * def inf...
import copy import datetime import glob import os import pickle import sys import traceback import warnings def django_reconnect(): # pragma: no cover """ Fixes dropped postgres connection in jupyter notebooks. """ from django.db import connections conn = connections['default'] conn.connect()...
#!/usr/bin/env python3 # encoding: utf-8 # détecte trois fois avec trois images de varroas différentes crop_3, crop_25 et crop_89 # MAIS il ne décompte qu'une fois les varroas grace à la fonction count(listOfTuple) import sys,os,json,requests import time from time import sleep import cv2 import collections import im...
# Copyright Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompan...
# Standard library imports from copy import deepcopy from functools import wraps from typing import Callable, final, Final, Optional, ParamSpec, TypeVar # Local application imports from gym_snape.game.effects import effects # Typing definitions P = ParamSpec('P') T = TypeVar('T') def capture_action(bound_method: Ca...
from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.http import HttpResponse, Http404 from django.shortcuts import render, redirect from django.urls import reverse from django.views.decorators.csrf import csrf_exempt from rbms.models import Room, Booking import datetime # S...
""" Manage a set of parameters $Header: /nfs/slac/g/glast/ground/cvs/pointlike/python/uw/like2/parameterset.py,v 1.7 2017/08/02 22:53:11 burnett Exp $ """ import os, types import numpy as np class ParameterSet(object): """ Manage the free parameters in the ROI model, as a virtual array Notes: i...
#Hunt the Wumpus #From a vintage BASIC game program #by CREATIVE COMPUTING MORRISTOWN, NEW JERSEY #Rewritten in Python by <NAME> # Python 3.4 # ** To do ** # - Make connections within cave random. So that no two caves are the same. import random import sys import threading import time import datetime import signal # ...
import warnings import numpy as np import pytest from pandas import ( DataFrame, Index, MultiIndex, Series, Timestamp, concat, date_range, isna, notna, ) import pandas._testing as tm import pandas.tseries.offsets as offsets def f(x): # suppress warnings about empty slices, a...
# coding: utf-8 import re import os import warnings __all__ = ['Tomd', 'convert'] MARKDOWN = { 'h1': ('\n# ', '\n'), 'h2': ('\n## ', '\n'), 'h3': ('\n### ', '\n'), 'h4': ('\n#### ', '\n'), 'h5': ('\n##### ', '\n'), 'h6': ('\n###### ', '\n'), 'code': ('`', '`'), 'ul': ('', ''), 'ol...
# encoding: UTF-8 from __future__ import division from copy import copy from collections import OrderedDict from math import log1p from language.chinese.vt_constant import * from trader.vtObject import VtTickData from .omDate import getTimeToMaturity # 常量定义 CALL = 1 PUT = -1 OM_DB_NAME = 'VnTrader_OptionMaster_D...
import operator import numpy as np from abc import ABCMeta, abstractmethod from dipy.segment.metric import Metric from dipy.segment.metric import ResampleFeature from dipy.segment.metric import AveragePointwiseEuclideanMetric class Identity: """ Provides identity indexing functionality. This can replace an...
""" Utility functions for Rudaux """ import os import re import sys import shutil import urllib.parse as urlparse from git import Repo from git.exc import GitCommandError from typing import List from terminaltables import AsciiTable # The functions here are not attached to a class as per advice: # https://stackoverfl...
from __future__ import absolute_import from __future__ import unicode_literals import collections import contextlib import imp import os import sys import pkg_resources Arguments = collections.namedtuple('Arguments', ('all', 'patches', 'cmd')) class PymonkeySystemExit(SystemExit): pass class PymonkeyError(R...
from datacube.utils import geometry import numpy import xarray from affine import Affine class WCSScalerException(Exception): pass class WCSScalerUnknownDimension(WCSScalerException): def __init__(self, dim, *args, **kwargs): super().__init__(*args, **kwargs) self.dim = dim class WCSScalerOve...
import uuid import warnings from functools import wraps from typing import Optional, Iterator, Iterable from queue import Empty, Full from datetime import datetime import time from redis import Redis from .constants import DEFAULT_SERIALIZER, POLL_INTERVAL, Side from .base_queue import BaseQueue, BaseJoinableQueue fr...
""" tests.remote ~~~~~~~~~~~~~~ Tests Home Assistant remote methods and classes. Uses port 8122 for master, 8123 for slave Uses port 8125 as a port that nothing runs on """ # pylint: disable=protected-access,too-many-public-methods import unittest from unittest.mock import patch import homeassistant.core as ha import...
import numpy import time #import pprocess from multiprocessing import Pool from astropy.io import fits import numpy as np from spectral_cube import SpectralCube import astropy.units as u def para_predict(modname): from keras.models import load_model model = load_model(modname[0]) prediction = model.predict...
from ore import Ore from Item.item import Item from AI import * #from enemies import * from RoguePy.libtcod import libtcod from sounds import waterSound Tin = Ore('Tin') Tin.setColor(libtcod.Color(211, 212, 213)) Tin.genCount = 50 Tin.genMin = 0.025 Tin.genMax = 0.5 Tin.multiplier = 0.75 Copper = Ore('Copper') Copper...
# File: autofocus_connector.py # Copyright (c) 2021 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # pylint: disable=W0614,W0212,W0201,W0703,W0401,W0403 # Phantom imports import phantom.app as phantom from phantom.base_connector import BaseConnector from phantom.action_res...
############################################################################## # # Copyright (c) 2008 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
import pandas as pd import numpy as np import os from sklearn.model_selection import StratifiedKFold def add_stratified_test_splits(original_dataframe, group_key, test_frac = 0.2): rs = np.random.RandomState(0) data = original_dataframe.copy()...
"""Module to interface with the OpenStack API.""" import datetime import logging import socket from time import sleep from typing import Optional from libcloud.compute.base import NodeImage, NodeSize from libcloud.compute.drivers.openstack import OpenStackNetwork, StorageVolume from libcloud.compute.providers import g...
# Mostly based on the code written by <NAME>: # https://github.com/mrharicot/monodepth/blob/master/utils/evaluate_kitti.py from __future__ import division import sys import cv2 import os import numpy as np import argparse from depth_evaluation_utils import * import time import matplotlib as mpl mpl.use('Agg') import ...
import matplotlib.pyplot as plt import numpy as np import scipy.interpolate as spln import pyDOE as pd import matplotlib.animation as anime import sys import Images_Generator as ig import shutil import os """ Airfoil_DataSet_Generator_Randomizer.py --------------------------------------------- This program is used to c...
from collections import defaultdict import datetime import psycopg2 from .utils import debug def GetExperimentIdByVals(con, cur, arrName, arrValue, userid=None, logic='any'): """ Searching for id of an experiment matching the details input: details : list of 'Name' and list of 'Value' the de...
#!/usr/bin/env python3 # 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. """ SubModule code for BlenderBot2. Contains implementations of the Query Generator and Memory Decoder. """ from enum imp...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
# -*- coding: utf-8 -*- """Extract PRMU keyphrases from TREC formatted files.""" import os import re import gzip import argparse from collections import defaultdict from nltk.stem import PorterStemmer from nltk.tokenize import word_tokenize from tqdm import tqdm def average(lst): return sum(lst) / len(lst) def ...
#!/usr/bin/python3 import amulet import os import unittest import yaml import uuid import time from amulet_utils import check_systemd_service from amulet_utils import kubectl from amulet_utils import run from amulet_utils import valid_certificate from amulet_utils import valid_key from amulet_utils import wait SECON...
from builtins import chr from builtins import object class Observable(object): def __init__(self): self.Callbacks = [] def addHandler(self, h): if h not in self.Callbacks: self.Callbacks.append(h) def notify(self, rows, cols): for cbk in self.Callbacks: cb...
# Adapted from https://github.com/rddy/ReQueST/blob/master/rqst/dynamics_models.py from __future__ import division from copy import deepcopy import os from matplotlib import pyplot as plt import tensorflow as tf import numpy as np from .models import TFModel from . import utils class MDNRNNDynamicsModel(TFModel): ...
# author: <NAME>, <NAME> # date: 2020-01-22 '''This script reads in 5 .csv files located in the <file_path_data> folder: 1. All accepted vanity plates 2. All rejected vanity plates 3. Combined rejected and undersampled rejected plates 4. Feature training data 5. Targ...
# -*- coding: utf-8 -*- """ Created on Mon Mar 12 13:55:37 2018 @author: anthony.woznica Absolutely ANY USE of the following functions REQUIRE CREDIT IN THE HEADER OF THE FILE (WOZNICA Anthony). There are NO exceptions. This file contains all methods concerning text analysis. """ import utils as ut import re impor...
"""Functions to assist in making matplotlib and bokeh plots.""" import matplotlib.pyplot as plt import pandas as pd import numpy as np def datetime_to_hour(date_time): """Convert a datetime object to the fractional hour of the day as a float (03:15pm --> 15.25)""" return date_time.hour + date_time.minute / 6...
"""Helper functions for Z-Wave JS integration.""" from __future__ import annotations from collections.abc import Callable from typing import Any, cast import voluptuous as vol from zwave_js_server.client import Client as ZwaveClient from zwave_js_server.const import ConfigurationValueType from zwave_js_server.model.n...
""" Copyright (C) 2013-2019 Calliope contributors listed in AUTHORS. Licensed under the Apache 2.0 License (see LICENSE file). time.py ~~~~~~~ Functionality to add and process time varying parameters """ import xarray as xr import numpy as np import pandas as pd from calliope import exceptions from calliope.core.at...
# # Copyright 2018-2021 Elyra 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 applicable law or agreed to in writ...
#!/usr/bin/python # ex:set fileencoding=utf-8: from __future__ import unicode_literals from django.db import models from django.db.models import Q from django.utils.timezone import now from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from djangobmf...
from dcptree.zero_one_loss.tests.testing_helper_functions import * from dcptree.zero_one_loss.heuristics import * from dcptree.zero_one_loss.mip import * #setup random_seed = 2338 data_name = 'adult' selected_groups = [] #['Race', 'Sex'] ## load / process data data data_file = '%s/%s_processed.pickle' % (data_dir, da...
import numpy as np from collections import namedtuple import logging from beliefs.models.belief_update_node_model import ( InvalidLambdaMsgToParent, BeliefUpdateNodeModel ) from beliefs.utils.math_helper import is_kronecker_delta logger = logging.getLogger(__name__) MsgPassers = namedtuple('MsgPassers', ['...
#!/usr/bin/python3 # Copyright 2021 Alibaba Group Holding Limited. All Rights Reserved. import argparse import os import os.path as osp import time from functools import partial import torch.cuda from torch.utils.data import DataLoader, DistributedSampler from essmc2 import Config, DATASETS, MODELS, SOLVERS, get_log...
# 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, software # distributed under t...
# -*- coding: utf-8 -*- """ Author ------ <NAME> Email ----- <EMAIL> Created on ---------- - Sun Jun 11 12:00:00 2017 Modifications ------------- - Sun Jun 11 12:00:00 2017 Aims ---- - utils for processing spectra """ import sys from collections import OrderedDict, Set, Mapping, deque from numbers import Number ...
import heapq, collections, re, sys, time, os, random import collections import math # Abstract interfaces for search problems and search algorithms. # Builders and utilities for language models class Node: """ Classe que abstrai as informacoes de um no' de busca A classe Node e' uma classe que abstrai o con...
#!/usr/bin/env python3 """ Simulate pairs of sequences of values chosen from the unit interval under a mutation model, counting the number of mutated kmers. A 'sequence pair' is a random linear sequence and a mutated version of it. The mutated version is consistent with a model where the sequence represents hash value...
import random from datetime import datetime as dt from enum import Enum from typing import NamedTuple, List import math import os from os import listdir from os.path import isfile, join import pandas as pd import numpy as np # Data structures class Location(Enum): HOME = "home" WORK = "work" ...
"""Utillity class for processing scansion and text.""" import unicodedata import sys import re __author__ = ['<NAME> <<EMAIL>>'] __license__ = 'MIT License' """Helper methods for processing scansion""" qu_matcher = re.compile("[qQ][uU]") def remove_punctuation_dict() -> dict: """Provide a dictionary for removi...
from typing import Optional from assemblyline.common.str_utils import safe_str from assemblyline.common import forge from assemblyline.odm.models.user import User from assemblyline.odm.models.user_settings import UserSettings from assemblyline.remote.datatypes.hash import Hash from assemblyline_ui.config import LOGGER...
#!/usr/bin/env python3 # Read ftrace input, looking for XFS buffer deadlocks. # # Copyright (C) 2016 Oracle. All Rights Reserved. # # Author: <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 Soft...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Oct 22 04:45:31 2019 @author: heba """ import base64 import os import re import numpy as np import pandas import dash from dash.dependencies import Input, Output import dash_core_components as dcc import dash_html_components as html from app import a...
import smtplib import mimetypes import os from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.base import MIMEBase from email import Encoders import logging import email from quickmail.error import MailException log = logging.getLo...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2020 Huawei Device Co., Ltd. # 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/LIC...
# -*- coding: utf-8 -*- # kakasi.py # # Copyright 2011-2018 <NAME> <<EMAIL>> # __license__ = 'GPL 3' __copyright__ = '2014-2019 <NAME> <<EMAIL>>' __docformat__ = 'restructuredtext en' ''' Flags: These flags are as same as KAKASI. p: List all possible readings. If there exist two or more possible readings, ...
#Tic-Tac-Toe_strategy.py #Allows the user to compete agansist a computer opponent. #Based off of <NAME>'s example program- Tic-Tac-Toe_basic.py #The second in a series of Tic-Tac-Toe games. #Changes made in this edition form the exterior POV: #The user can select a difficulty level and cannot cause errors. #Chang...
# # Pyserini: Reproducible IR research with sparse and dense representations # # 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...
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt import frappe from frappe import _ from datetime import datetime from datetime import date def execute(filters=None): columns, data = [], [] columns.append("Unpaid Leave") if filters.year: filte...
# 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, software # d...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' Created on May 15, 2019 @author: <NAME> @Ajou University This project is developed and tested with Python3.5 using pycharm on an Ubuntu 16.04 LTS machine ''' from keras.applications.vgg19 import VGG19 # from keras.applications.vgg19 import decode_predictions from ker...
#!/usr/bin/python3 from bs4 import BeautifulSoup from html.parser import HTMLParser import json from functools import reduce import requests from pymongo import MongoClient client = MongoClient() db = client['scheduler'] collection = db['cachedData'] #define semester SEMESTER = 'F20' def convertTime(x): if(x[...
from collections import Counter from tqdm import tqdm from analyze_results import get_latex_code from helper import file_utils as file import pandas as pd def get_detailed_relations(id1, id2, dataset): filtered_triples = file.get_filtered_triples(dataset) # Triples all_entities = file.get_entity2id(dataset) ...
# -*- coding: utf-8 -*- """ Greating demos --- scene factorisation, novel-view synthesis, and disentanglement. @author: <NAME> """ import sys import os import random from attrdict import AttrDict import numpy as np import argparse import torch # set project search path ROOT_DIR = os.path.abspath("./") sys.path.append(...
#! /usr/bin/env python3 # Instagram Scraper # Coded by <NAME> # http://github.com/isdteam # I am not responsible for anything you do with this script # This is the main script meant to be run from the command line # # import argparse from bs4 import BeautifulSoup import json import os import requests impor...
# coding: utf-8 """View module.""" from __future__ import unicode_literals from django.shortcuts import render, redirect from django.db.models import F, Sum, Q from django.contrib.auth.models import User from django.conf import settings from django.contrib.auth import authenticate, login, logout from account.models i...
#관심종목 from discord import Embed from discord.ext import commands from discord.ext.commands import Context from discord_slash import SlashContext, cog_ext from discord_slash.model import SlashCommandOptionType as OptionType from discord_slash.utils.manage_commands import create_option, create_choice import asyncio fr...
""" This is an example which use gear.py. copyright (C) chromia<<EMAIL>> License: MIT License (see ./LICENSE) """ from typing import Tuple, Dict, Set, Any import pygame import sys import io import math from gear import make_gear_image class Gear: def __init__(self, params: Dict[str, Any], driver: 'Gear' = None)...
from multiprocessing import Pool, TimeoutError import time import os import requests import sys import itertools import threading import queue import random import uuid import datetime import json def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) endpoint = "http://orders-kn-channel.kcontaine...
"""Tests for the deduplication module""" from dfm.cleaning import Deduper from dfm.cleaning.deduper_utils import get_minhash, get_shingles, default_normalization import tempfile from pathlib import Path import json import re import pytest def word_shape(doc: str) -> str: """Aggressive normalization function used...
#!/usr/bin/env python from __future__ import division from __future__ import absolute_import import argparse import os import matplotlib.pyplot as plt import pandas from sklearn.linear_model import LogisticRegression from ops import * def preprocess(path): df = pandas.read_csv(path, delimiter=';') # age ...
# Add global arguments import random import os import logging import numpy as np from profiler.globalvar import * from profiler.learner import StructureLearner from profiler.data.embedding import EmbeddingEngine from profiler.data.transformer import TransformEngine from profiler.data.dataset import Dataset from profile...
import abc import typing from . import binarystore from . import key as key_ from . import objectstore from . import query as query_ class util: # noqa from .util import metadata from .util import stream T_co = typing.TypeVar("T_co", covariant=True) #FIXME: This stuff should support streaming data to the maxi...
# -*- coding: utf-8 -*- """ webapp2_extras.local ~~~~~~~~~~~~~~~~~~~~ This module implements thread-local utilities. This implementation comes from werkzeug.local. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ try: ...
#pylint: disable=missing-docstring,line-too-long from decimal import Decimal from hive.utils.post import ( mentions, post_basic, post_legacy, post_payout, post_stats, ) POST_1 = { "abs_rshares": 0, "active": "2017-06-20T15:53:51", "active_votes": [ { "percent": 1000...
""" Defines the ColorMapper and ColorMapTemplate classes. """ # Major library imports from types import IntType, FloatType from numpy import arange, array, asarray, clip, divide, float32, int8, isinf, \ isnan, ones, searchsorted, sometrue, sort, take, uint8, where, zeros, \ linspace, ones_like # Entho...
import argparse from contextlib import contextmanager import hashlib import os from random import Random import shutil import sys import tempfile import boto from simplejson import dumps from sqlalchemy import text from ichnaea.config import read_config from ichnaea.db import ( Database, db_worker_session, ) ...
import os import time import argparse import random import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.autograd import Variable import torch.backends.cudnn as cudnn import torchvision.utils as vutils import torchvision.transforms as transforms ...
###### # # video_utils.py # # Utilities for splitting, rendering, and assembling videos. # ###### #%% Constants, imports, environment import os import cv2 import glob # from ai4eutils import path_utils from tqdm import tqdm from typing import Container,Iterable,List from visualization import visualization_util...
""" ==================================================================================================== Image alignment and registration ==================================================================================================== **<NAME>, <NAME>, <NAME>** * Institute for Functional Imaging of Materials * Ce...
# This code is a part of XMM: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS). # Last modified by <NAME> (<EMAIL>) 09/06/2021, 16:34. Copyright (c) <NAME> from functools import wraps from multiprocessing.dummy import Pool from subprocess import Popen, PIPE from typing import Tuple fro...
# This file is a part of StarNet code. # https://github.com/nekitmm/starnet # # StarNet is a neural network that can remove stars from images leaving only background. # # Throughout the code all input and output images are 8 bits per channel tif images. # This code in original form will not read any images othe...
#!/usr/bin/env python3 """ Reports and notifies inactive admins. The following parameters are required: -config The page title that has the JSON config (object) The following parameters are supported: -max_attempts The maximum number of attempts to notify (default: 3) """ # Author : JJMC89 # License: ...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import hashlib from typing import List, Tuple, Any, Dict, Callable import numpy as np from . import utils from . import c...
# -*- coding: utf-8 -*- """ Created on Fri Apr 15 15:32:52 2016 @author: drsmith """ from __future__ import print_function from __future__ import division from builtins import object from past.utils import old_div import gc import numpy as np import scipy.signal import scipy.interpolate from matplotlib import animat...
#Copyright 2008-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #Permission is hereby granted, free of charge, to any person obtaining a copy of this #software and associated documentation files (the "Software"), to deal in the Software #without restriction, including without limitation the rights to use...
import sys import glob import serial import datetime def serial_ports(): """ Lists serial port names :raises EnvironmentError: On unsupported or unknown platforms :returns: A list of the serial ports available on the system """ if sys.platform.startswith('win'): ...
""" Valence, Coordination_number, Pi electron_num and c/r^2 representation (VCP) of atom in molecule, where c, r are the column and row number of the corresponding element in periodic table VCP is designed for prediction of melting & boiling points of molecule """ from openeye.oechem import * import aqml.cheminfo.O...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/vulnerablecode/ # The VulnerableCode software is licensed under the Apache License version 2.0. # Data generated with VulnerableCode require an acknowledgment. # # You may not use this software except in comp...
"""RyuApp shim between Ryu and Gauge.""" # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2017 The Contributors # # 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 co...
import os import pandas as pd from unidecode import unidecode def evaluate_banner(): print('\n**************************************************') print('************Evalulting Reconciliations************') print('**************************************************') def evaluate_and_clean_mer...
import os from collections import namedtuple import subprocess import tempfile import requests import pathlib import pytest import mlflow from tests.helper_functions import LOCALHOST, get_safe_port from tests.tracking.integration_test_utils import _await_server_up_or_die def is_windows(): return os.name == "nt" ...
#!/usr/bin/python3 """ Conolist all codes here. i put the all code here to prevent releative imports error in python. @2020 Author <NAME> <E-RROR> """ from os.path import isfile, join, isdir import os import platform from os import listdir import subprocess import curses KEYS_ENTER = (curses.KEY_E...
import pandas as pd import datetime import numpy as np import os import re import calendar import math path = ("path to data that has been reformatted using my code") test1 = os.listdir(path)[0] test2 = os.listdir(path)[40000] columnsToDrop = ['underlying_price', 'timestamp', 'state', 'settlement_price'...