text
stringlengths
8.04k
46.5k
import kubernetes import requests import os import json import datetime import logging from django.conf import settings from substrapp.utils import timeit from substrapp.exceptions import PodErrorException, PodTimeoutException import time logger = logging.getLogger(__name__) MEDIA_ROOT = os.getenv('MEDIA_ROOT') REGI...
# -*- coding: utf-8 -*- # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This module is not automatically loaded by the `cros` helper. The filename # would need a "cros_" prefix to make that happe...
import system from matplotlib import pyplot import matplotlib.gridspec as gridspec import matplotlib.patches as mpatches from matplotlib.collections import PatchCollection import time import numpy pi, cos, sin = numpy.pi, numpy.cos, numpy.sin magnets = system.System() vect_temp = '%.03f,'*7 def vectors_strip(arra...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Move Plan Controller Düğümü (Şimdilik ortama Scene eklemek ve bazı testler için kullanılıyor) """ import os import sys import copy import math from datetime import datetime import pickle from moveit_commander.conversions import pose_to_list import yaml import moveit_...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Provide the Cartpole robotic platform. """ import os import numpy as np import pybullet_data import sympy import sympy.physics.mechanics as mechanics from pyrobolearn.robots.robot import Robot from pyrobolearn.utils.transformation import get_symbolic_matrix_from_axis_a...
import bs4 as bs import os import os.path import requests import base64 import json from datetime import datetime, timezone from requests.packages import urllib3 # rrdtool dump test.rrd > test.xml cfg_name = 'config.json' db_path = '/home/lcladmin/cmstats/data/' web_path = '/var/www/html/cmstats/' def main(): wi...
# 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...
# Script for auto-downloading the necessary files to run PPP solutions in Ginan import click import random import ftplib import logging import requests import numpy as np from time import sleep from pathlib import Path from copy import deepcopy import concurrent.futures from itertools import repeat from collections imp...
import itertools import os from collections import OrderedDict import numpy as np import six import tensorflow as tf import tensorflow.contrib.graph_editor as ge from tensorflow.core.framework import node_def_pb2 from tensorflow.python.framework import device as pydev from tensorflow.python.training import device_sett...
#!/usr/bin/env python # coding=utf-8 # vim: set ts=4 sw=4 expandtab syntax=python: """ xbake.mscan.mscan Media Scanner @author <NAME> <<EMAIL>> @repo https://git.ycnrg.org/projects/YXB/repos/yc_xbake Copyright (c) 2013-2017 <NAME> / Neo-Retro Group, Inc. https://ycnrg.org/ """ import sys import os import re ...
from elasticsearch import Elasticsearch import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt plt.ioff() from matplotlib.backends.backend_pdf import PdfPages from matplotlib.dates import AutoDateLocator, AutoDateFormatter import numpy as np from scipy import stats import datetime as dt import math imp...
import dedupe import logging import os import re import sys import traceback from collections import defaultdict from datetime import datetime from django.conf import settings from django.contrib.postgres.search import TrigramSimilarity from django.db import transaction from django.db.models import Q, Max from unideco...
# -*- coding: utf-8 -*- # 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 copy import functools import glob import logging import os import pickle import re import shutil import signal import subprocess import numpy as np import pandas as pd from functools32 import lru_cache from tqdm import tqdm import pyffe logging.basicConfig(format='%(levelname)s %(asctime)s: %(message)s', date...
"""Define high level structure StagyyData and helper classes. Note: The helper classes are not designed to be instantiated on their own, but only as attributes of StagyyData instances. Users of this module should only instantiate :class:`StagyyData`. """ from __future__ import annotations from collection...
# --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.4.2 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- import sys sys.path.appen...
#!/usr/bin/env python3 #<NAME> #JPL/Caltech import os import sys import glob import argparse from crlpac import run_record_cmd from crlpac import writeSARconfig_ALOS2 from crlpac import read_insar_arg from crlpac import set_filename def cmdLineParse(): ''' Command line parser. ''' parser = argpars...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2015-2021 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
# # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER # # Copyright (c) 2015 Juniper Networks, Inc. # All rights reserved. # # Use is subject to license terms. # # 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...
import sys, os, glob, string import pandas as pd from collections import OrderedDict import shutil import numpy as np from pyraf import iraf from photutils import detect_sources from photutils import source_properties import odi_config as odi import pandas as pd import astropy from astropy.coordinates import SkyCoord f...
from ctypes import addressof import os import fire import pefile import sys import numpy as np import pickle import json from unicorn import * from unicorn.x86_const import * from capstone import * from capstone.x86_const import * BASE = 0x140000000 EMU_START = 0x1461743F0 EMU_END = EMU_START + 0x10000 REGISTER_MEM...
# -*- coding: utf-'8' "-*-" import logging import openerp from openerp.osv import osv, fields from openerp.tools import float_round, float_repr from openerp.tools.translate import _ _logger = logging.getLogger(__name__) def _partner_format_address(address1=False, address2=False): return ' '.join((address1 or '...
import os import sys import re import yaml import logging from collections import namedtuple import healpy import numpy as np import numpy.ma as ma import pyarrow.parquet as pq from astropy import units from desc.skycatalogs.objects import * from desc.skycatalogs.readers import * from desc.skycatalogs.readers import Pa...
import re from enum import Enum import fastcore.all as fc import natsort import rich def _generate_old2new_labels_dict(): """ Code used to generate Old2New_labels dictionary. Only run once and saved the output as a constant. """ import requests src_url = "https://git.tu-berlin.de/rsim/BigEar...
import logging.config import os import stat import time from src.view.constants import LOG_SETTINGS from src.view.util.FileOperationsUtil import FileOperations import wx from src.view.util.common.eclutil import Freezer from src.view.util.osutil import GetWindowsDrives, GetWindowsDriveType, \ RemovableDrive, CDRO...
import datetime import os.path import pprint import matplotlib.pyplot as plt import numpy as np import pandas as pd from ophyd.utils import LimitError from ophyd import Signal import bluesky.plan_stubs as bps import bluesky.preprocessors as bpp from bluesky.callbacks import LiveGrid # Testing VI with Yonghua # T...
from .mixins import GroupRequiredMixin from rest_framework.response import Response from rest_framework.views import APIView import datetime, time import pandas as pd import sys, os import numpy as np import re from pandas.tseries.offsets import BDay import scipy.stats import igraph try: from .semutils.analytics....
import numpy as np import torch from pathlib import Path import json import random import re import torch.backends.cudnn as cudnn import torch.multiprocessing as mp import time import fire import torch.distributed as dist import os from collections import defaultdict import kornia import flow_vis import copy import a...
# -*- coding: utf-8 -*- from itertools import product import os import uuid import dask import dask.array as da from dask.array.core import normalize_chunks from dask.highlevelgraph import HighLevelGraph import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal import pyrap.tables as ...
#!/usr/bin/env python3 import argparse import collections import glob import json import logging import os import platform import re import subprocess import sys import tempfile from datetime import datetime from util.color_logger import get_logger from util.console import query_yes_no import util.datamodel as dm f...
# -*- coding: utf-8 -*- from typing import Any, Dict, List, Tuple, Union from aws_vapor import utils from collections import OrderedDict RegexPattern = str MapNameOrMapping = Union[str, 'Mapping'] LogicalNameOrElement = Union[str, 'Element'] IntrinsicFunction = Dict[str, Any] PseudoParameter = Dict[str, Any] class...
#!/usr/bin/env python """API handlers for dealing with flows.""" import itertools from grr.gui import api_call_handler_base from grr.gui import api_call_handler_utils from grr.gui.api_plugins import output_plugin as api_output_plugin from grr.lib import access_control from grr.lib import aff4 from grr.lib import cli...
from __future__ import print_function import json import os import sys from unit_parser import unit_parser from .malt_composition import specific_gravity_to_gravity_points def main(): """Entry point for brew_day command line script. """ import argparse this_dir, this_filename = os.path.split(__file__...
from __future__ import print_function, division import sys import os import torch import numpy as np import random import cv2 import csv from six import raise_from from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils from torch.utils.data.sampler import Sampler import skimage.io i...
# -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # 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 ...
#!/usr/bin/env python3 from termcolor import colored env = dict() """ Set software environmental configuration, not used for now """ def set_env(key="", val=""): global env env[key] = val def disas(pos=0, cnt=-1): ins_list = list() limit = len(env['data']) while 1: byte = hex(env['data'][pos])[2:].rjust(2,...
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.map.MapDecor from pandac.PandaModules import * from direct.gui.OnscreenText import OnscreenText from direct.gui.DirectGui import...
#!/usr/bin/env python # encoding: utf-8 """ Created by belangeo on 2011-04-13. """ from pyo import * import random, time, sys from random import uniform as rnd class RunFm: def __init__(self, TM, TAPS, changeFreqSelect, fmTranspo, countCloseDisto, finalFadeout, IndSwitch, num=4): self.env = ExpTable([(0,0...
from __future__ import annotations import math import warnings from functools import partial from itertools import count from typing import Callable, Sequence, Union import numpy as np import pandas as pd from scipy.optimize import minimize from scipy.stats import chi2 from pykelihood.cached_property import cached_p...
#!/usr/bin/env python3 #import music21 import math import numpy as np import pprint diatonicsMap = { 'Lydian': [0, 2, 4, 6, 7, 9, 11], 'Ionian': [0, 2, 4, 5, 7, 9, 11], 'Mixolydian': [0, 2, 4, 5, 7, 9, 10], 'Dorian': [0, 2, 3, 5, 7, 9, 10], 'Aeolian': [0, 2, 3, 5, 7, 8, 10], 'Phrygian': [0, 1...
''' Author:<NAME> <EMAIL>''' # Import required libraries import pathlib import dash import numpy as np from dash.dependencies import Input, Output, State, ClientsideFunction import dash_core_components as dcc import dash_html_components as html import plotly.figure_factory as ff import plotly.graph_objec...
import logging import os import numpy as np import tensorflow as tf import tensorflow.keras as keras import tensorflow.keras.layers as kl from keras.models import Model from keras_radam import RAdam from tensorflow.keras.layers import Activation from tensorflow.keras.layers import BatchNormalization from tensorflow.ke...
import time from datetime import date # Third-Party from algoliasearch_django.decorators import disable_auto_indexing from openpyxl import Workbook from openpyxl.writer.excel import save_virtual_workbook from phonenumber_field.validators import validate_international_phonenumber # Django from django.apps import apps ...
import numpy as np import networkx as nx from matplotlib import pyplot as plt def check_inverted(dst_x, dst_y): return (dst_x > dst_y) # perform line routing # @param src: source indices # @param dst: destination indices def line_routing(src, dst, verbose=False): assert(len(src.shape) == 1) assert(len(src) == len(...
from __future__ import absolute_import, print_function import os import tensorflow as tf import numpy as np import cv2 from PIL import Image, ImageDraw, ImageFont from IPython.display import display _BATCH_NORM_DECAY = 0.9 _BATCH_NORM_EPSILON = 1e-05 _LEAKY_RELU = 0.1 _ANCHORS = [(10, 13), (16, 30), (33, 23), ...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from model.utils.config import cfg from model.rpn.bbox_transform import bbox_transform_inv, clip_boxes from model.fcgn.bbox_transform_grasp import labels2points, grasp_decode from model.roi_layers...
import requests from bs4 import BeautifulSoup import time from openpyxl import Workbook date = input("Crawling을 진행할 날짜를 입력해주세요. (YYYYMMDD) : ") wb = Workbook() time = time.localtime() headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari...
# -*- coding: utf-8 -*- #import pdb; pdb.set_trace() from __future__ import unicode_literals, print_function import sys import os import pyloco # Push name collection to leaf nodes # filter part of subnodes to stop the push # distinguish definition from reference #self._search_subnodes(node, ids, rtypes) cl...
""" plotting. here be dragons. CK 2014 """ import numpy as np import matplotlib import networkx as nx from matplotlib import pyplot as plt from matplotlib import animation from hcUtil import printprogress from numpy.random import RandomState plt.ion() golden_mean = (np.sqrt(5)-1.0)/2.0 fig_width = 2*3.27 # column widt...
""" Copyright (c) 2021 Graphcore Ltd. All rights reserved. """ """ # Efficient data loading with PopTorch """ """ This tutorial will present how PopTorch can help to efficiently load data to your model and how to avoid common performance bottlenecks when passing data from the host to the IPU. It also covers the more ge...
import os import ast import re import yaml from jinja2 import Environment, BaseLoader, FileSystemLoader, select_autoescape import traceback import functools import time import cProfile import io import pstats import datetime import appdaemon.homeassistant as ha import appdaemon.conf as conf def profile_this(fn): ...
import argparse from collections import defaultdict from collections import namedtuple from itertools import zip_longest from itertools import groupby import logging import sys import textwrap import os import json from typing import Dict, List, Iterable, Union, Tuple from unk_replacer.lexical_dictionary import Lexic...
""" quant_layers """ import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from torch.autograd import Variable # from torch._jit_internal import weak_script_method # from .utee import wage_initializer,wage_quantizer from .quantizer import * def odd_symm_quant(input, nbit, mode='mean',...
# (C) Copyright 2017 Inova Development Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# + # #!/usr/bin/env python # coding: utf-8 # - import sage.all from sage.calculus.var import var, function from sage.misc.reset import reset from sage.calculus.functional import diff try : from delierium.helpers import (is_derivative, is_function, eq, order_of_derivative) from d...
''' (*)~--------------------------------------------------------------------------- Pupil - eye tracking platform Copyright (C) 2012-2017 <NAME> Distributed under the terms of the GNU Lesser General Public License (LGPL v3.0). See COPYING and COPYING.LESSER for license details. ---------------------------------------...
#!/usr/bin/env python """Script to train pair-HMMs of cPecan. """ import math import os import random from optparse import OptionParser, OptionGroup from jobTree.scriptTree.target import Target from jobTree.scriptTree.stack import Stack from sonLib.bioio import setLoggingFromOptions, logger, system, popenCatch, ciga...
""" Attempt at a multi-pass CST (concrete syntax tree) RST-ish parser. This does not (and likely will not) support all of RST syntax, and may support syntax that is not in the rst spec, mostly to support Python docstrings. Goals ----- The goal in here is to parse RST while keeping most of the original information av...
from __future__ import division # workaround of the bug where 'import torchvision' sets the start method to be 'fork' import torch.multiprocessing as mp if mp.get_start_method(allow_none=True) != 'spawn': mp.set_start_method('spawn') import logging from log_helper import init_log, print_speed init_log('brc') init_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from contextlib import contextmanager import attr import pytest from lxml import etree from regparser.grammar import tokens from regparser.notice import amdparser from regparser.notice.amdparser import Amendment from regparser.test_utils.xml_builder imp...
import numpy as np from magpylib._src.fields.special_cel import cel def el30(x, kc, p): """ incomplete elliptic integral el3 from Numerical Calculation of Elliptic Integrals and Elliptic Functions ROLAND BULIRSCH Numerische Mathematik 7, 78--90 (t965) """ # pylint: disable=too-many-branches ...
import numpy as np import copy import sys from nsrl.helper import tree try: import cPickle as pickle except ModuleNotFoundError: import pickle class DataSet(object): """A replay memory consisting of circular buffers for observations, actions, rewards and terminals.""" def __init__(self, env, random_s...
import os import sys import re import gzip import tarfile import io import scipy import collections import argparse import pandas as pd import numpy as np from scipy.stats import binom from pandas.api.types import is_string_dtype from pathlib import Path import numbers import warnings class FormatError(Exception): ...
import logging import numpy as np import numba import math import sys import time from multiprocessing.pool import ThreadPool from plato.backend.common import * from plato.backend.branch_common import * from plato.backend.stat_expression import * from .adapter import BranchTrainingHeatMapAdapter, calc_location logg...
import itertools as it import re import string import os import hashlib import cssselect2 from colour import web2hex from xml.etree import ElementTree from tinycss2 import serialize as css_serialize from tinycss2 import parse_stylesheet, parse_declaration_list from manimlib.constants import ORIGIN, UP, DOWN, LEFT, RI...
# formatter.py - generic output formatting for mercurial # # Copyright 2012 <NAME> <<EMAIL>> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. """Generic output formatting for Mercurial The formatter provides API to show data in va...
from PIL import Image, ImageTk import numpy as np import matplotlib.pyplot as plt from math import sin, cos, pi, ceil from cv2 import namedWindow, imshow, WINDOW_AUTOSIZE, waitKey import random from random import randint import gym from gym import spaces import os from stable_baselines.common.env_checker impo...
#!/usr/bin/env python3 import sys import os.path import argparse import struct parser = argparse.ArgumentParser(description='Build c++ source files from Unicode ucd text files.') parser.add_argument("--output", dest="output_path", action="store", required=True) parser.add_argument("--output-non-starter", dest="output...
import sys import os import argparse import numpy as np import h5py import itertools from collections import defaultdict import json import torch from torch import cuda from transformers import * def get_tokenizer(key): model_map={"bert-base-uncased": (BertModel, BertTokenizer), "roberta-base": (RobertaModel, Robe...
"User creation, display, edit. Login/logout endpoints." import datetime import fnmatch import http.client import json import re import flask import werkzeug.security import anubis.call from anubis import constants from anubis import utils from anubis.saver import BaseSaver def init(app): "Initialize; update Co...
# -*- coding: utf-8 -*- """ Implements the spatial optimization algorithms """ __author__ = "<NAME>" __copyright__ = "Copyright 2018, <NAME>" __credits__ = ["Dr. <NAME>", "Dr. <NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>"] __license__ = "GPL" __version__ = ...
""" utilities ========= Collection of classes and functions for components and services of ApBsInT: - Potential manager - Model (PM and B factor) - Representation """ import numpy as np import scipy.sparse as ssp import scipy.linalg as sla import numbers import time # For profiling import apbsint.helpers as helper...
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2009-2011 by the RMG Team (<EMAIL>) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this softwa...
import base64 import traceback from datetime import date, datetime import os import re import sys import traceback import json import requests import uuid import pprint import modules.readConfig as config from types import SimpleNamespace ### Minimum Python Version: 3.7 DEBUG = False ################...
import os import sys #import fcntl import shutil import pty import threading import subprocess import posixpath from lxml import etree try: from Queue import Queue, Empty pass except ImportError: from queue import Queue, Empty # python 3.x pass try: from shlex import quote as quoteshell # new...
import logging from collections import OrderedDict import os import traceback from great_expectations.cli.datasource import DATASOURCE_TYPE_BY_DATASOURCE_CLASS from great_expectations.core import nested_update from great_expectations.data_context.store.html_site_store import ( HtmlSiteStore, SiteSectionIdent...
from django.shortcuts import render,redirect from django.views.generic import TemplateView, ListView from django.views.generic.edit import FormView from django.http import HttpResponse,HttpResponseRedirect from .models import Person,Task,GPSData,DataStorage,ClueMedia,WaypointsData,GPShistoricalData,ExperimentDataStorag...
################################################################################ # (C) Copyright 2020-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...
import logging import os import warnings import typing from collections import defaultdict, namedtuple from typing import Any, Dict, List, Optional, Text, Tuple, Union import rasa.utils.io as io_utils from rasa.core.domain import Domain from rasa.nlu.constants import ( EXTRACTOR, ENTITY_ATTRIBUTE_VALUE, EN...
"""Implementation of the Transport Service.""" from copy import deepcopy from datetime import datetime import gc import logging import queue import select import socket from socketserver import TCPServer, ThreadingMixIn, BaseRequestHandler try: import ssl _HAS_SSL = True except ImportError: _HAS_SSL = Fa...
from __future__ import print_function import numpy as np from collections import Iterable import itertools from openmdao.api import Group, ExplicitComponent, ScipyIterativeSolver, LinearRunOnce, IndepVarComp from pycycle.cea import species_data from pycycle.cea.set_total import SetTotal from pycycle.cea.set_static i...
# 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...
#!/usr/bin/env python3 # -*- coding : utf-8 -*- import hashlib import html import os import re import dateutil.parser from pathlib import Path from datetime import datetime import gzip import requests import atoma from urllib import request from http.cookiejar import CookieJar from lxml.html.soupparser import fromstrin...
import uuid import json import time import logging import elasticsearch.exceptions as eexc from mist.api import config from mist.api.helpers import es_client as es from mist.api.helpers import amqp_publish from mist.api.exceptions import NotFoundError from mist.api.exceptions import BadRequestError from mist.api.exc...
# # # 0=================================0 # | Kernel Point Convolutions | # 0=================================0 # # # ---------------------------------------------------------------------------------------------------------------------- # # Define network blocks # # ---------------------------...
""" A Vocabulary maps strings to integers, allowing for strings to be mapped to an out-of-vocabulary token. """ import codecs import logging import os from collections import defaultdict from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Union from typing import TextIO # pylint: disable=unused-imp...
# Copyright 2019-2020 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" fil...
# # 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...
# coding=utf-8 import struct import datetime from abc import ABCMeta, abstractmethod from weakref import WeakKeyDictionary class DWORDValue(object): """A descriptor for DWORD values""" def __init__(self): self.data = WeakKeyDictionary() def __get__(self, obj, type): return stru...
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) Copyright IBM Corp. 2010, 2018. All Rights Reserved. """ Command line tool to manage and run resilient-circuits """ from __future__ import absolute_import import argparse import logging import os import os.path import sys from collections import defaultdict import p...
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Created on 8. jan. 2018 @author: ELP ''' import sys import numpy as np from PyQt5.QtWidgets import (QMainWindow,QAction,qApp,QFileDialog, QFrame,QSplitter,QLabel,QActionGroup,QSpinBox,QMessageBox, QApplication,QTextEdit,QListWidget,QGroupB...
# <NAME> # May 2010 # Jan 2020. Added new "MINT netCDF" metadata. import os import sys import time import datetime import numpy as np from . import file_utils # from . import rti_files # (not used for unit_test() yet. from . import svo_names from . import tf_utils import netCDF4 as nc #------------------------...
r"""Tabs as in browser tabs, not \t characters.""" from __future__ import annotations import collections import dataclasses import hashlib import importlib import itertools import logging import os import pathlib import tkinter import traceback from tkinter import filedialog, messagebox, ttk from typing import ( A...
import os import contextlib import ipaddress import json import logging import netaddr import pytest import random from jinja2 import Template from tests.common.helpers.assertions import pytest_assert as pt_assert from tests.common.helpers.generators import generate_ips from tests.common.helpers.parallel import parall...
import numpy as np import bottleneck as bn import pandas import os import matplotlib.pyplot as plt from matplotlib import colors from scipy import stats from ttools import config, io, plotting MONTH_INDEX = { 'winter': [0, 1, 10, 11], 'equinox': [2, 3, 8, 9], 'summer': [4, 5, 6, 7], } DITHER = { 'ml...
import os import tensorflow as tf import math import numpy as np import pandas as pd import itertools import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.animation as animation from matplotlib.lines import Line2D import matplotlib.patheffects as path_effects import matplotlib as mpl i...
#!/usr/bin/env python import csv import os import time import math import matplotlib.pyplot as plt import numpy as np import mapel.elections.metrics_ as metr import mapel.elections.features_ as features from mapel.main._inner_distances import l2, chebyshev from mapel.elections.objects.ApprovalElectionExperiment impo...
""" sentry.models.dsymfile ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import re import os import six import uuid import time import errno import shutil import hashlib import...
from functools import partial import re import json import random import torch import numpy as np from scipy.optimize import minimize from torch.nn import functional as F from numpy import * # to override the math functions from matplotlib import pyplot as plt from tqdm import tqdm import math import warnings def set...
""" Page class that all page models can inherit from There are useful wrappers for common Selenium operations """ from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.action...