text
stringlengths
8.04k
46.5k
# # Copyright (C) 2014 Red Hat, Inc # # 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 wr...
import os import re import glob import socket import struct import logging import binascii import threading import subprocess import netfilterqueue from debuglevels import * from collections import defaultdict from . import diverterbase class IptCmdTemplateBase(object): """For managing insertion and removal of ip...
# Copyright 2017-2021 TensorHub, Inc. # # 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 -*- """ Indexed Generators """ #***************************************************************************** # Copyright (C) 2013 <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 # ...
# tests to ability to run flow model first followed by transport model import os import shutil import numpy as np try: import pymake except: msg = "Error. Pymake package is not available.\n" msg += "Try installing using the following command:\n" msg += " pip install https://github.com/modflowpy/pymake...
# # Copyright 2018 Analytics Zoo 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...
#!/usr/bin/python2 # # enumerid.py # # Copyright 2017 <NAME> <CoreyGilks [at] gmail [dot] com> # Twitter: @CoreyGilks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of ...
import pygame, copy, sys import numpy as np ###################################################################################################### ###################################### Ustawienia początkowe zmiennych################################ ################################################################...
import json, os import requests from script.utils import async_download from common.mongo import MongoDBBase from conf.settings import MONGODB_CONFIG HEADERS = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36', 'Accept': '*/*', } URL...
from kivy.uix.boxlayout import BoxLayout from kivy.uix.carousel import Carousel from kivy.uix.image import AsyncImage from kivy.uix.image import Image from kivy.uix.label import Label from kivy.uix.button import Button from kivy.metrics import dp, sp from kivy.properties import StringProperty, NumericProperty from fanc...
# PyQt library from PyQt5 import QtCore, QtGui, QtWidgets, uic from PyQt5.QtCore import QThread, Qt, pyqtSignal, pyqtSlot # Mouse control library import pyautogui pyautogui.FAILSAFE = False # CV logic import cv # CV component import cv2 # OpenCV import math import numpy as np from scipy import spatial from dateti...
""" LAMMPS ====== Simulation operations using the `LAMMPS engine <https://docs.lammps.org>`_ for classical molecular dynamics are provided. They can be accessed using the corresponding :class:`~relentless.simulate.generic.GenericOperation`. The following LAMMPS operations have been implemented. .. autosummary:: ...
# Copyright (C) 2010 Ion Torrent Systems, Inc. All Rights Reserved import sys import os import json import glob import traceback sys.path.append("/opt/ion/") os.environ["DJANGO_SETTINGS_MODULE"] = "iondb.settings" from django.db import connection, transaction, IntegrityError from django.utils import timezone from ion...
""" Copyright Government of Canada 2020-2021 Written by: <NAME>, National Microbiology Laboratory, Public Health Agency of Canada Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License at: http:...
""" :synopsis: Interface classes to Redis components, such as, e.g., ordered lists. """ from datetime import datetime from webrecorder.utils import get_bool, get_new_id # ============================================================================ class DupeNameException(Exception): """Raised when field name alre...
# Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by applicable law or a...
from sklearn import metrics import os import sys import time import numpy as np import tensorflow as tf from tensorflow.python.ops.metrics_impl import _streaming_confusion_matrix """ Multiclass tf_metrics from: https://github.com/guillaumegenthial/tf_metrics/blob/master/tf_metrics/__init__.py __author__ = "<NAME>" """...
# -*- coding: utf-8 -*- import json import os import re import sys import time import urllib import execjs import pandas as pd import requests from fake_useragent import UserAgent import openpyxl def checkNameValid(name=None): reg = re.compile(r'[\\/:*?"<>|\r\n]+') valid_name = reg.findall(name) if valid_...
# coding: utf8 from __future__ import print_function, unicode_literals, division import os import re import sys import json import time import argparse import tempfile import unicodedata from collections import defaultdict from . import color, utils, tpl try: from html import escape except ImportError: from ...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import copy from datetime import datetime from functools import partial import os import re from code import Code import json_parse # The t...
#!/usr/bin/env python3 # Copyright (c) 2002-2008 ActiveState Software Inc. # License: MIT License (http://www.opensource.org/licenses/mit-license.php) # Adapted for inary with python3 by Zaryob """ Preprocess a file. Command Line Usage: preprocess [<options>...] <infile> Options: -h, --he...
from ._util import * from ._powerCurveConvoluter import * from ._simulator import * from reskit.weather.sources import MerraSource, CosmoSource from reskit.weather.windutil import * def _batch_simulator(source, landcover, gwa, adjustMethod, roughness, loss, convScale, convBase, lowBase, lowSharp, lctype, ...
"""Parser combinators for reading XML files. This module is heavily based on PEGTL_, a parser combinator library for C++. .. _PEGTL: https://github.com/taocpp/PEGTL Exceptions ---------- ============================== =========================================== Name Description ========...
""" Module implementing geometry classes """ from abc import ABCMeta, abstractmethod from math import ceil from typing import Iterator, List, Optional, Tuple, TypeVar, Union import shapely.geometry import shapely.ops import shapely.wkt from shapely.geometry import MultiPolygon, Polygon from shapely.geometry.base impor...
import argparse import configparser import ntpath import shutil import time import sys, os, re from context import diana import diana.classes.drug as diana_drug import diana.classes.functional_analysis as functional_analysis import diana.classes.network_analysis as network_analysis import diana.classes.top_scoring as ...
# -*- coding: utf-8 -*- """ Contains the crawling logic. """ from __future__ import unicode_literals, absolute_import import base64 from collections import defaultdict import logging import sys import time from pylinkvalidator.included.bs4 import BeautifulSoup, UnicodeDammit import pylinkvalidator.compat as compat f...
# This file is part of COFFEE # # COFFEE is Copyright (c) 2014, Imperial College London. # Please see the AUTHORS file in the main source directory for # a full list of copyright holders. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
""" Tools and helper methods for cross-correlation of the NICER data of MAXIJ1535 """ import numpy as np import itertools from astropy.io import fits from astropy.table import Table, Column from scipy.stats import binned_statistic __author__ = '<NAME> <<EMAIL>>' __year__ = "2017-2018" def find_nearest(array, value)...
from pathlib import Path import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import numpy as np from scipy import interpolate def plot_history(out, history, metric='loss', val=True, title=None, width=8, height=6): title = title or 'model {}'.format(metric) val_metric = 'val_{}'.format(me...
from django.shortcuts import render, redirect from django.http import JsonResponse, HttpResponse from django.contrib.auth import authenticate, login from django.core.mail import send_mail from django.contrib.auth import logout from django.conf import settings from django.contrib.auth.decorators import login_required i...
from __future__ import division import bisect import logging try: from collections import namedtuple, Counter except ImportError: from backport_collections import namedtuple, Counter from datetime import datetime, date, timedelta from multiprocessing import Lock from six.moves import StringIO from dateutil.rel...
from pysb.simulator.base import Simulator, SimulationResult import scipy.integrate try: # weave is not available under Python 3. from weave import inline as weave_inline import weave.build_tools import distutils.errors except ImportError: weave_inline = None try: import theano.tensor from sy...
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
#!/usr/bin/env python3 # Consume mail received from PowerMTA # command-line params may also be present, as per PMTA Users Guide "3.3.12 Pipe Delivery Directives" # # Author: <NAME>. (c) 2018 SparkPost # # Pre-requisites: # pip3 install requests, dnspython # import os, email, time, glob, requests, dns.resolver, smtpl...
# Copyright 2016 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 applicab...
from __future__ import print_function import configparser as ConfigParser import argparse import shelve import sys import os import subprocess import threading import shutil import time import re from helpers import * shelve_name = "dump.shelve" # contains all the measurement objects history_file = "history.log" clock...
""" x----------------------------------------------x | AFSKmodem - Simple, reliable digital radio. | | https://jmeifert.github.io/afskmodem | x----------------------------------------------x """ import wave import struct import pyaudio from datetime import datetime import os from time import sleep ###########...
#!/usr/bin/env python """Generate a dot graph from a list of Fortran 90 files.""" __author__ = "<NAME>" __version__ = "0.1.1" import sys import os.path import re import math import optparse import fileinput import string debug = 1 quiet = 1 warns = 0 prune = 0 def _print(str,fi=None): if quiet: return if fi: sys...
from secpy256k1 import utils from _secpy256k1 import lib, ffi CONTEXT_FLAGS = [ lib.SECP256K1_CONTEXT_VERIFY, lib.SECP256K1_CONTEXT_SIGN, lib.SECP256K1_CONTEXT_NONE ] def context_create(flags): '''Create a secp256k1 context object. Args: flag (int): which parts of the ...
from abc import ABC, abstractmethod from jawa.assemble import assemble from jawa.cf import ClassFile from jawa.methods import Method from jawa.constants import * from jawa.util.descriptor import method_descriptor from jawa.util.bytecode import Operand # See https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.ht...
from __future__ import division, print_function, absolute_import from itertools import product from numpy.testing import assert_allclose import pytest from scipy import special from scipy.special import cython_special int_points = [-10, -1, 1, 10] real_points = [-10.0, -1.0, 1.0, 10.0] complex_points = [complex(*t...
# -*- coding: utf-8 -*- from __future__ import absolute_import from bs4 import BeautifulSoup import logging import click import json import requests import sys import os from azkaban_cli.azkaban import Azkaban from azkaban_cli.exceptions import ( NotLoggedOnError, LoginError, SessionError, UploadError,...
from __future__ import print_function from six import iteritems import netCDF4 import os import uuid from .. import utils import numpy as np import collections from scipy import interpolate from scipy.signal import decimate class QncException(Exception): pass def to_str(s): if not isinstance(s,str) and isins...
# GIS4WRF (https://doi.org/10.5281/zenodo.1288569) # Copyright (c) 2018 <NAME> and <NAME>. Licensed under MIT. from typing import Optional, Tuple, Dict, Any, Iterable, Union import math import os import sys import shutil import tempfile from collections import namedtuple import numpy as np import numpy.ma as ma from...
from collections import OrderedDict from datetime import datetime as dt from django.contrib import messages from django.http import JsonResponse from django.shortcuts import redirect, get_object_or_404 from django.views.decorators.http import require_POST from lessons.forms import LessonPlanForm, CourseDropdo...
import PIL from PIL import Image import matplotlib.pyplot as plt from libtiff import TIFF from libtiff import TIFFfile, TIFFimage from scipy.misc import imresize import numpy as np import glob import cv2 import os import math from sklearn.metrics import confusion_matrix, cohen_kappa_score from unet import UNet import s...
#! /usr/bin/python # coding: utf-8 # Copyright 2018 IBM All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
#!/usr/bin/env python3 # --------------------( LICENSE )-------------------- # Copyright (c) 2014-2021 Beartype authors. # See "LICENSE" for further details. ''' Project-wide **callable scope** utilities (i.e., functions handling the possibly nested lexical scopes enclosing arbitrary callable...
# -*- coding: utf-8 -*- # Copyright 2012-2013 UNED # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# # $Id: collection.py 699 2010-04-06 08:05:44Z hat $ # """ Collection of events + automata + weighted automata. """ import os, sys, re from automata import baseobjects, ConfigParser # {{{ class Collection class Collection(baseobjects.BaseObject): """ Class to keep the alphabet information, since this is share...
def read_DOKAoutput_files(config): """ All filenames should follow the pattern: ID_num_run_trialnum_direction*.csv If they don't, use the R script nameFixer_v2.R in LizardTails first. The summary file for the current DOKA project will be stored in the summary_folder in analysis_results. :param confi...
from collections import deque import sys """ --- Day 15: Beverage Bandits --- Having perfected their hot chocolate, the Elves have a new problem: the Goblins that live in these caves will do anything to steal it. Looks like they're here for a fight. You scan the area, generating a map of the walls (#), open cavern (...
# -*- coding: utf-8 -*- """ trueskill ~~~~~~~~~ The video game rating system. :copyright: (c) 2012-2016 by <NAME> :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from itertools import chain import math from six import iteritems from six.moves import map, range...
"""conftest.py module for testing.""" from datetime import datetime, timedelta, timezone import string import time import pytest import pandas as pd # type: ignore from typing import Any, Tuple import socket from ibapi.connection import Connection from ibapi.message import IN, OUT from ibapi.comm import (make_field...
# Copyright 2014 VMware, 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...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 14 13:57:33 2020 @author: <NAME> """ # A problem with ARIMA is that it does not support seasonal data. That is a time series with a repeating cycle. # ARIMA expects data that is either not seasonal or has the seasonal component removed, e.g. seas...
# -*- coding: utf-8 -*- """ Oxford Experiment: ibeis TestResult --db Oxford -p smk:nWords=[64000],nAssign=[1],SV=[False],can_match_sameimg=True -a oxford Zebra Experiment: python -m ibeis draw_rank_cmc --db GZ_Master1 --show \ -p :proot=smk,num_words=[64000],fg_on=False,nAssign=[1],SV=[False] \ ...
from ipykernel.kernelbase import Kernel import sys from .code_object import CodeObject, SymbolWrapper from .execute import Executor, ExecutionResult, CapturedIOCtx from .dependencies import DependencyTracker import traceback as tb from typing import Union, Any, Dict, FrozenSet from IPython.core.formatters import Displa...
import sys import datetime timeout_time = 600.0 caption = "Experimental Results. Benchmarks are grouped by categories introduced in Section \\ref{sec:cstudies}. \# steps indicates the number of refinement rounds. $T_{last}$ is the elapsed time before the last call to the SyGuS solver in the last refinement step bef...
# Standard Library import enum import logging import re from collections import OrderedDict from typing import Union import attr from flaskdoc.core import ApiDecoratorMixin, DictMixin, ExtensionMixin, ModelMixin from flaskdoc.swagger import validators from flaskdoc.swagger.schema import ContentMixin, schema_factory ...
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import random import time from collections import defaultdict from functools import reduce from typing import Optional from pyqrllib.pyqrllib import bin2hstr from twi...
from attributes import Attributes from dataclasses import dataclass, field from itertools import combinations, islice, product from operator import attrgetter from typing import Optional from enum import Enum, unique @dataclass class Member: name: str attr: Attributes level: int job: str id: int = ...
import para_diff import para_diff_rearrange as para_diff_rearr import word_diff import diff_utils import doc_diff_visualize as vis from collections import Counter def doc_diff_from_strings( actual, target, rearrange_phrases=False, min_rearrange_length=3, refuse_com...
from __future__ import absolute_import, division, print_function from iotbx.pdb.tst_pdb import dump_pdb from cctbx import geometry_restraints from iotbx.pymol import pml_stick, pml_write from cctbx.array_family import flex from scitbx.matrix import col, sqr from scitbx.math import euler_angles_as_matrix from libtbx.tes...
# Poslanci a Osoby # Agenda eviduje osoby, jejich zařazení do orgánů a jejich funkce v orgánech a orgány jako takové. # Informace viz https://www.psp.cz/sqw/hp.sqw?k=1301. from os import path import pandas as pd import numpy as np from parlamentikon.utility import * from parlamentikon.Snemovna import * from parlame...
# # Copyright 2010-2021 University of Southern California # # 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...
# ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # 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.apa...
# Copyright 2021 DeepMind Technologies Limited. # # 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...
# ================================================================= # # Authors: <NAME> # <<EMAIL>> # # 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 ...
import time from catswalk.scraping.types.type_webdriver import * import boto3 import os import json import csv import os from regoogle.drive import * from lark import Lark, Transformer from catswalk.scraping.types.type_webdriver import * import os import time import logging from bs4 import BeautifulSoup from selenium...
# Author: Epihaius # Date: 2019-09-23 # # This module contains classes to implement a "sizer" system, the purpose of # which is to maintain the layout of widgets when resizing the window. from panda3d.core import * class SizerItem: def __init__(self, sizer, obj, obj_type, proportion=0., expand=False, ...
import sys, os, json import requests import psycopg2 from urllib3.filepost import encode_multipart_formdata ### # RUN AS USER UBUNTU ### # TODO: Update pipeline to use new nested dataset structure def main(): with open(inputfile, 'r') as inp: curr_group = { "sensor": None, # e.g. "co2...
"""Demo code for computing Neuron's tuning w.r.t """ from hessian_eigenthings.power_iter import Operator, deflated_power_iteration from hessian_eigenthings.lanczos import lanczos from lanczos_generalized import lanczos_generalized from GAN_hvp_operator import GANHVPOperator, compute_hessian_eigenthings #%% import torc...
import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import matplotlib.animation as animation from collections import deque import scipy.ndimage.filters import serial import sys from pynput import keyboard import os import threading import math import random import time import json from termco...
import os import logging import json from operator import itemgetter import dtoolcore import dtoolcore.utils from ruamel.yaml import YAML # This is a hack. from dtool_info.inventory import _dataset_info from dtool_info.utils import sizeof_fmt from dtool_gui_tk.metadata import MetadataSchemaItem logger = logging.g...
#!/usr/bin/python3 __DOC__ = """ talk to EMM server *at all* from ordinary Python See also https://github.com/google/android-management-api-samples/blob/master/notebooks/quickstart.ipynb """ # Copyright 2018 Google LLC. # © <NAME> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use ...
import logging, sys, time, os, re, binascii, subprocess, ast import serial, socket, serial.tools.list_ports, select import websocket # the old non async one serialtimeout = 0.5 serialtimeoutcount = 10 wifimessageignore = re.compile("(\x1b\[[\d;]*m)?[WI] \(\d+\) (wifi|system_api|modsocket|phy|event|cpu_start|heap_ini...
from __future__ import unicode_literals import gc import importlib import sys import itertools from box import BoxClient from box import BoxClientException from bson import ObjectId from dropbox.client import DropboxClient from dropbox.rest import ErrorResponse from github3 import GitHubError from oauthlib.oauth2 imp...
#! /usr/bin/python2.7 import argparse import errno import os import subprocess import sys import test_cli def main(): args = CodalabArgs.get_args() service_manager = CodalabServiceManager(args) service_manager.execute() class CodalabArgs(argparse.Namespace): DEFAULT_ARGS = { 'version': 'lat...
import numpy as np def lanc(numwt, haf): """ Generates a numwt + 1 + numwt lanczos cosine low pass filter with -6dB (1/4 power, 1/2 amplitude) point at haf Parameters ---------- numwt : int number of points haf : float frequency (in 'cpi' of -6dB point, 'cpi' is cycl...
# -*- coding: utf-8 -*- from __future__ import print_function, division from sympy.core.basic import Basic from sympy.printing.defaults import DefaultPrinting from sympy.utilities import public from sympy.utilities.iterables import flatten from sympy.combinatorics.free_group import FreeGroupElement from itertools impo...
import numpy as np, pandas as pd, matplotlib.pyplot as plt import os, pickle, subprocess, itertools from numpy import array as nparr from glob import glob from matplotlib.ticker import MultipleLocator, FormatStrFormatter def scp_rms_percentile_files(statsdir, outdir): if not os.path.exists(outdir): os.mk...
import os import re import json from assessments.types import * from dlkit.records.registry import ANSWER_GENUS_TYPES, ANSWER_RECORD_TYPES from dlkit.runtime import PROXY_SESSION, RUNTIME from dlkit.runtime.errors import NotFound, InvalidArgument, Unsupported, NullArgument from dlkit.runtime.primitives import Type, ...
""" Copyright (c) Microsoft Corporation. Licensed under the MIT license. OPT finetuning for video-Text Retrieval """ import argparse import os from os.path import join from time import time import torch from torch.nn.utils import clip_grad_norm_ from torch.utils.data import DataLoader from apex import amp from horov...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Created on Tue Mar 31 16:20:13 2020 # Author: <NAME> """ Raster ======= To do: 1. Read, write, analyze, and visualise gridded raster data 2. Convert shape data to raster data --------------- """ import os import copy import math import fiona import numpy as ...
# Copyright (c) 2021 ralabo.jp # This software is released under the MIT License. # see https://opensource.org/licenses/mit-license.php # ==================================================== import os import sys import re import json import numpy as np import pandas as pd from copy import deepcopy from colle...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
import os import re import sys import unittest from array import array from collections import defaultdict, deque from sys import version_info, version from unittest import skipIf from tests.utils import TestCaseWithUtils, temp_attrs, assert_unique, Counter, skipUnless, OldStyleClass try: from collections import ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division, print_function, absolute_import import decimal import datetime import inspect import re import base64 import json import logging import dsnparse from datatypes import Datetime from .compat import * from . import utils logger = logging.getLog...
"""Load remote meet data to DB.""" import copy import datetime import json import logging import os import sys from io import StringIO from urllib.error import HTTPError from urllib.request import Request, urlopen import pandas as pd from codetiming import Timer from data.models.meets import Meet from data.models.syn...
import pytest import sys import numpy as np import os #import os.path as osp import yaml import matplotlib.pyplot as plt from scipy.interpolate import PchipInterpolator import wisdem.inputs as sch # used for loading turbine YAML and using WISDEM validation process from wisdem.commonse.utilities import arc_length # ...
""" Plots a dI/dV(Vg, Bz) Landau Fan Note that this works differently from didv.landau_fan, which takes a list of BASENAMES and magnetic-field values. This Python module reads the value of the magnetic field directly from the .dat file. .dat files are basename_LoopIndex_SpectraIndex Assumes the gate voltages are th...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Jun 28 08:32:18 2018 @author: avanetten Implemention of the TOPO metric https://pdfs.semanticscholar.org/51b0/51eba4f58afc34021ae23641fc8e168fdf07.pdf """ import os import sys import time import numpy as np import networkx as nx import scipy.spatial ...
#!/usr/bin/env python3 import argparse import base64 import contextlib import io import json import logging import os import sys import tarfile import time import docker from ..common import PatchStatus from ..database import Db l = logging.getLogger("patchbot") def bin_diff(byte_arr1, byte_arr2): byte_diff = ...
import arrow import calendar import copy import datetime from dateutil import parser import math import random import plotly.express as px import plotly.figure_factory as ff import plotly.graph_objs as go from plotly.subplots import make_subplots from data_handler import DataHandler from date_unit import DateUnit ...
""" Script to compute synthetic time & frequency ASCII files """ __author__ = "<NAME>" from os.path import join as pjoin from os import listdir as lsdir import numpy as np import obspy import instaseis from matplotlib import mlab as mlab import matplotlib.pyplot as plt from obspy import UTCDateTime as utct import scip...
from behave import when, then, use_step_matcher from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import Select, WebDriver...
# CharCut: lightweight character-based MT output highlighting and scoring. # Copyright (C) 2017 Lardilleux # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
""" FFJORD on MNIST, implemented with Haiku. """ import argparse import collections import os import pickle import sys import time import haiku as hk import jax import jax.numpy as jnp from jax import lax from jax.config import config from jax.experimental import optimizers from jax.experimental.jet import jet from ja...